Dandandan commented on issue #15676: URL: https://github.com/apache/datafusion/issues/15676#issuecomment-2795881552
> > I wonder, why do we even support LAST_VALUE / FIRST_VALUE as plain aggregate functions? I think hey don't make any sense as aggregate functions (but only as window functions). > > DuckDb has `first` `last` too, I guess it would be useful in some cases? 🤔 The reaction I have is because the result of `first_value` and `last_value` when given no ordering that will make results deterministic will be not deterministic (depending on how te function is executed). If DataFusion would switch to another mode of execution or grouping implementation that doesn't maintain same order, functions like these would break (based on what users might expect from them). -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For additional commands, e-mail: github-h...@datafusion.apache.org