microsoft / Trill

Trill is a single-node query processor for temporal or streaming data.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

MissingMethodException when using QueryContainer()

cernuto opened this issue · comments

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?

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?