Closed wassim-k closed 3 years ago
Generally Trill will not output anything when there are no events. However, the previous result has an expiration, so the absence of an event can be meaningful as well. You can also ingress dummy events (one per window) to force the output.
Further, Deaccumulate
is called on End Edges, but intervals are handled with Difference
. I'd recommend using a snapshot window macro (e.g., TumblingWindowLifetime.
For future reference, I was able to solve this using the following:
stream
.Count()
.Multicast(count => count
.Union(count
.Select(i => 0ul)
.Stitch()
.PointAtEnd())
Hi, I have the following code and I couldn't figure out how I could get Trill to output a 0 when the last event leaves the snapshot window. I tried
OutputDefaultWhenEmpty
with no success.It seems like the Aggregate's
Deaccumulate
is not being invoked. Is there anyway to accomplish this?Output