silundong opened a new pull request, #4754: URL: https://github.com/apache/calcite/pull/4754
This PR makes two changes: 1. During decorrelation, `Sort` will always be rewritten as `[Filter-]Window`, not only when both `ORDER BY` and `LIMIT/OFFSET` are present, because `ORDER BY`, `LIMIT` and `OFFSET` have to be enforced per value of the outer bindings instead of globally. 2. For the JIRA case, the bug was that when rewriting `Sort` into `Filter-Window`, the decorrelator forgot to set the frame clause for the window function, causing `ROW_NUMBER()` to be computed incorrectly. This has now been fixed. -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
