Open cernuto opened 4 years ago
A careful application of Multicast has fixed the issue
var eventToSend = _eventInputStream.Multicast(ev => { return ev.Join(_meterInputStream, (evt, mtr) => new { evt, mtr }) .AlterEventDuration(StreamEvent.InfinitySyncTime) .ClipEventDuration(_eventAckInputStream, evtMtr => evtMtr.evt.Id, evtAck => evtAck.Id) .Join(ev, (evtMtr, evt) => evtMtr) .Multicast(evtMtr => evtMtr.Min(em => em.evt.Id).Join(evtMtr, l => l, r => r.evt.Id, (e, m) => new { e, m })); });
I imagine this is a more efficient way to do the query. Now, if someone could post examples of Pivot and Unpivot?
When using query container the following exception is thrown when using aggregate extension method:
System.MissingMethodException: 'Method not found: 'Void Microsoft.CodeAnalysis.CSharp.CSharpCompilationOptions
Here is the query:
var eventToSend = _eventInputStream.Multicast(ev => { return ev.Join(_meterInputStream, (evt, mtr) => new { evt, mtr }) .AlterEventDuration(StreamEvent.InfinitySyncTime) .ClipEventDuration(_eventAckInputStream, evtMtr => evtMtr.evt.Id, evtAck => evtAck.Id) .Join(ev, (evtMtr, evt) => evtMtr) .GroupApply(evtMtr => evtMtr.mtr.Key, em => em.Min((eml, emr) => eml.mtr.DateTime.Ticks.CompareTo(emr.mtr.DateTime.Ticks))); });
When .Min() is removed it will not throw. Also, when not using a QueryContainer() it will not throw.
Is it due to incompatible versions or wrong version installed?