zed
zed copied to clipboard
Stateful expressions in user defined functions
Aggregations are supposed to carry separate state for each textual invocation but this rule breaks apart when using aggregation expressions in user defined functions. Observe:
func c(): ( count() )
yield [c(), c(), c()]
currently returns
[1,2,3]
when it should be returning [1,1,1].