Closed mattnibs closed 2 weeks ago
Verified in Zed commit 9c3f5fd.
The example program now returns the expected output that reflects separate state with each invocation.
$ zq -version
Version: v1.15.0-42-g9c3f5fdc
$ zq 'func c(): ( count() ) yield [c(), c(), c()]'
[1(uint64),1(uint64),1(uint64)]
Thanks @mattnibs!
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:
currently returns
when it should be returning
[1,1,1]
.