Closed novotny1akub closed 1 year ago
Hi, first_value
is a window function, not an aggregate function, and so only applies in contexts that support ordered windows of values (e.g., derive
, but not rollup
). The correct behavior is to throw an error when invoking a window function in a non-window context.
The error message, however, should have been much clearer. Your post helped me to find a bug regarding error checking that I've fixed in #288. Thanks!
Thanks a lot for the explanation, @jheer.
I am having trouble using
op.first_value
fromarquero
. Below is an example that demonstrates the issue. When using, for example,.rollup({sum: op.sum('value')})
instead of.rollup({first_value: op.first_value('value')})
, it works fine so I assume this could be a bug inop.first_value
because other aggregate functions work fine.