jhorstmann commented on issue #2448: URL: https://github.com/apache/arrow-datafusion/issues/2448#issuecomment-1118322899
A bit difficult to analyze without seeing the corresponding values of `c1`. If the values for `c1` are distinct then the result seems correct since the presence of `ORDER BY` changes what is considered a peer of the current row. The [postgres documentation](https://www.postgresql.org/docs/14/sql-expressions.html#SYNTAX-WINDOW-FUNCTIONS) describes this as: > The default framing option is RANGE UNBOUNDED PRECEDING, which is the same as RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW. > **With ORDER BY**, this sets the frame to be all rows from the partition start **up through the current row's last ORDER BY peer**. > **Without ORDER BY**, this means all rows of the partition are included in the window frame, **since all rows become peers of the current row**. -- 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...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org