-
Notifications
You must be signed in to change notification settings - Fork 889
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
Floating point order-by columns for RANGE window functions #13512
Merged
rapids-bot
merged 18 commits into
rapidsai:branch-23.08
from
mythrocks:range-window-float-oby
Jun 20, 2023
Merged
Floating point order-by columns for RANGE window functions #13512
rapids-bot
merged 18 commits into
rapidsai:branch-23.08
from
mythrocks:range-window-float-oby
Jun 20, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signed-off-by: MithunR <mythrocks@gmail.com>
Signed-off-by: MithunR <mythrocks@gmail.com>
mythrocks
added
feature request
New feature or request
non-breaking
Non-breaking change
labels
Jun 5, 2023
davidwendt
reviewed
Jun 8, 2023
mythrocks
force-pushed
the
range-window-float-oby
branch
from
June 8, 2023 22:27
1e3d28f
to
190edd5
Compare
ttnghia
reviewed
Jun 8, 2023
ttnghia
reviewed
Jun 8, 2023
mythrocks
added a commit
to mythrocks/cudf
that referenced
this pull request
Jun 8, 2023
JNI follow-up for rapidsai#13512, which added support for float/double columns as order-by for range window functions. This commit adds JNI support, to be able to do the same from Java.
ttnghia
approved these changes
Jun 13, 2023
davidwendt
reviewed
Jun 13, 2023
Co-authored-by: David Wendt <45795991+davidwendt@users.noreply.github.com>
davidwendt
reviewed
Jun 20, 2023
davidwendt
reviewed
Jun 20, 2023
davidwendt
reviewed
Jun 20, 2023
davidwendt
approved these changes
Jun 20, 2023
/merge |
Thank you for reviewing, chaps. I've merged this change. |
3 tasks
rapids-bot bot
pushed a commit
that referenced
this pull request
Jun 21, 2023
…ons (#13595) This is a JNI follow-up to #13512. This adds support in the Java CUDF API to use floating point types (`FLOAT32`/`FLOAT64`) as the order-by column for range-based window functions. There are no API changes; only the implementation was modified to permit floating-point types for the operation. A test was added to ratify behaviour. Authors: - MithunR (https://github.com/mythrocks) Approvers: - Nghia Truong (https://github.com/ttnghia) - Robert (Bobby) Evans (https://github.com/revans2) URL: #13595
mythrocks
added a commit
to mythrocks/cudf
that referenced
this pull request
Jun 28, 2023
This is a follow-up to rapidsai#13512 (which added support for floating point order-by columns in window functions), and rapidsai#13606 (which fixed how negative values are handled for floating point order-by). This commit fixes how `NaN` and `+/- Infinity` values are handled for floating point. Prior to this commit, the calculations for range window extents depended on the behaviour of `thrust::less<float>` and `thrust::greater<float>`, as well as addition/subtraction on `+/- Infinity`. This produced some unexpected results: 1. `thrust::less`/`greater` on `NaN` does not produce strict ordering. 2. Addition/Subtraction on the numerical values of `Infinity` could produce finite values that interfere with window extent calculations. Ideally, the results should have remained infinite. This commit adds custom comparators with `NaN` awareness, to better handle columns that contain `NaN`s. It also fixes range calculations where `Infinity` is involved. Tests have been added to cover ASC/DESC order sorting on `FLOAT`, with `NaN` and `Infinity` values.
3 tasks
rapids-bot bot
pushed a commit
that referenced
this pull request
Jul 5, 2023
This is a follow-up to #13512 (which added support for floating point order-by columns in window functions), and #13606 (which fixed how negative values are handled for floating point order-by). This commit fixes how `NaN` and `+/- Infinity` values are handled for floating point. Prior to this commit, the calculations for range window extents depended on the behaviour of `thrust::less<float>` and `thrust::greater<float>`, as well as addition/subtraction on `+/- Infinity`. This produced some unexpected results: 1. `thrust::less`/`greater` on `NaN` does not produce strict ordering. 2. Addition/Subtraction on the numerical values of `Infinity` could produce finite values that interfere with window extent calculations. Ideally, the results should have remained infinite. This commit adds custom comparators with `NaN` awareness, to better handle columns that contain `NaN`s. It also fixes range calculations where `Infinity` is involved. Tests have been added to cover ASC/DESC order sorting on `FLOAT`, with `NaN` and `Infinity` values. Authors: - MithunR (https://github.com/mythrocks) Approvers: - Vukasin Milovanovic (https://github.com/vuule) - Mike Wilson (https://github.com/hyperbolic2346) - https://github.com/nvdbaranec URL: #13635
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
libcudf
Affects libcudf (C++/CUDA) code.
non-breaking
Non-breaking change
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This commit adds support for
FLOAT32
andFLOAT64
order-by columns for RANGE-based window functions.Background
Up until this commit, order-by columns for RANGE window functions were allowed to be integral numerics, timestamps, or strings (for unbounded/current rows).
With this commit, window functions will be permitted to run on floating point value ranges. E.g. This supports windows defined with floating point deltas, like
rows with values exceeding the current row by no more than 3.14f
.This is in the same vein as the support for
DECIMAL
(#11645) andSTRING
(#13143).Checklist