Skip to content
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 Float order-by columns for RANGE window functions [databricks] #8637

Merged
merged 3 commits into from
Jul 10, 2023

Conversation

mythrocks
Copy link
Collaborator

@mythrocks mythrocks commented Jun 29, 2023

Fixes #7801.
Depends on rapidsai/cudf#13635.

This commit adds support for floating point order-by columns in RANGE based window functions.

Prior to this commit, when the GpuWindowExec was presented with an order-by column of floating-point type, the entire window operation would fall back to CPU execution. This should now execute entirely on the GPU.

Example query:

SELECT COUNT(1) OVER (PARTITION BY grp ORDER BY float_column
                      RANGE BETWEEN 1.023 PRECEDING AND 3.14159 FOLLOWING)
FROM my_float_table;

Depends on rapidsai/cudf#13635.

This commit adds support for floating point order-by columns in
RANGE based window functions.

Prior to this commit, when the `GpuWindowExec` was presented with an
order-by column of floating-point type, the entire window operation
would fall back to CPU execution. This should now execute entirely
on the GPU.

Example query:
```sql
SELECT COUNT(1) OVER (PARTITION BY grp ORDER BY float_column
                      RANGE BETWEEN 1.023 PRECEDING AND 3.14159 FOLLOWING)
FROM my_float_table;
```

Signed-off-by: MithunR <mythrocks@gmail.com>
@mythrocks
Copy link
Collaborator Author

We cannot run CI until rapidsai/cudf#13635 is merged. This is guaranteed to fail otherwise.

@mythrocks
Copy link
Collaborator Author

Build

@mythrocks mythrocks marked this pull request as ready for review July 6, 2023 21:35
@mythrocks mythrocks changed the title Support Float order-by columns for RANGE window functions Support Float order-by columns for RANGE window functions [databricks] Jul 6, 2023
@mythrocks
Copy link
Collaborator Author

Build

@mythrocks mythrocks requested a review from revans2 July 7, 2023 17:21
@mythrocks mythrocks merged commit 2839971 into NVIDIA:branch-23.08 Jul 10, 2023
24 checks passed
@mythrocks
Copy link
Collaborator Author

Thank you for the review, @revans2. I've merged this change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEA] Window Expression orderBy column is not supported in a window range function, found DoubleType
3 participants