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

Handling for NaN and inf when converting floating point to fixed point types #15885

Merged

Conversation

ttnghia
Copy link
Contributor

@ttnghia ttnghia commented May 29, 2024

This PR adds the ability to check for NaN and inf values when converting floating point types to fixed point types. For these input values, the corresponding output will be null.

Closes #15883.

Signed-off-by: Nghia Truong <nghiat@nvidia.com>
Signed-off-by: Nghia Truong <nghiat@nvidia.com>
Signed-off-by: Nghia Truong <nghiat@nvidia.com>
Signed-off-by: Nghia Truong <nghiat@nvidia.com>
@ttnghia ttnghia added bug Something isn't working 3 - Ready for Review Ready for review by team libcudf Affects libcudf (C++/CUDA) code. Spark Functionality that helps Spark RAPIDS improvement Improvement / enhancement to an existing function non-breaking Non-breaking change labels May 29, 2024
@ttnghia ttnghia self-assigned this May 29, 2024
@ttnghia ttnghia requested a review from a team as a code owner May 29, 2024 21:53
@ttnghia ttnghia removed the improvement Improvement / enhancement to an existing function label May 29, 2024
Signed-off-by: Nghia Truong <nghiat@nvidia.com>
Copy link
Contributor

@bdice bdice left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We probably want std::isfinite. Otherwise LGTM.

cpp/src/unary/cast_ops.cu Outdated Show resolved Hide resolved
cpp/src/unary/cast_ops.cu Outdated Show resolved Hide resolved
Signed-off-by: Nghia Truong <nghiat@nvidia.com>
@ttnghia ttnghia requested a review from bdice June 4, 2024 17:06
@ttnghia
Copy link
Contributor Author

ttnghia commented Jun 7, 2024

/merge

@rapids-bot rapids-bot bot merged commit 39c5b86 into rapidsai:branch-24.08 Jun 7, 2024
70 checks passed
@ttnghia ttnghia deleted the null_handling_for_float_to_decimal branch June 7, 2024 17:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3 - Ready for Review Ready for review by team bug Something isn't working libcudf Affects libcudf (C++/CUDA) code. non-breaking Non-breaking change Spark Functionality that helps Spark RAPIDS
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

[BUG] Converting from floating point types to fixed point types does not consider NaN and inf
4 participants