-
Notifications
You must be signed in to change notification settings - Fork 236
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support negative preceding/following for ROW-based window functions #9229
Support negative preceding/following for ROW-based window functions #9229
Conversation
Explicit loops. TODO: Replace comprehensions with maps.
1. AVG is slightly off at high precision. @approx_decimal would be nice to have. 2. COLLECT_SET results don't match. Needs investigation.
Keeping this in draft, until rapidsai/cudf#14093 is merged, and available in |
Signed-off-by: MithunR <[email protected]>
79977f3
to
af167bb
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just some nits
sql-plugin/src/main/scala/com/nvidia/spark/rapids/GpuWindowExec.scala
Outdated
Show resolved
Hide resolved
sql-plugin/src/main/scala/com/nvidia/spark/rapids/GpuWindowExec.scala
Outdated
Show resolved
Hide resolved
sql-plugin/src/main/scala/com/nvidia/spark/rapids/GpuWindowExpression.scala
Show resolved
Hide resolved
rapidsai/cudf#14093 was just merged. It shouldn't be long before this change can be put through CI. |
Build |
Signed-off-by: MithunR <[email protected]>
Build |
I've fixed an error in the lower-bounds checks: 55a3ec9 Spark bounds are positive and negative, depending on where it lies relative to the current row. This is different from CUDF, where preceding/following are positive; the direction is interpreted based on whether it's preceding or following. |
Another fix: I'm skipping |
Build |
Thank you for the review, @revans2. I have merged this change. |
Fixes #5314.
Depends on rapidsai/cudf#14093.
This commit adds support for negative values for preceding/following offsets specified for
ROW
based window functions.Prior to this commit, window function queries such as the following were not supported:
For this query, the window includes all rows between upto 5 rows preceding the current row, and the previous row.
This functionality is currently supported only for:
AVG
COUNT(1)
/COUNT(*)
MAX
MIN
SUM
COLLECT_LIST
COLLECT_SET