NVIDIA / NVIDIA/cudf

[FEA] Implement a more accurate float to decimal conversion that supports rounding instead of truncation

Open
#16,155 3 comments 0 reactions 0 assignees View on GitHub
feature request libcudf Spark
Dominant language
C++
Stars
9.8k
Forks
1.1k
Avg merge
3d 6m
Merged PRs (30d)
278

Description

Currently, there not exist any accurate float-to-decimal conversion. The closest operation to it is `cudf::round` which can produce some results that are not correct all the time. As such, we have issues like https://github.com/NVIDIA/spark-rapids/issues/9682 and https://github.com/NVIDIA/spark-rapids/issues/10809.

A new dedicated conversion code in https://github.com/rapidsai/cudf/pull/15905 supposes to add some special handling for float-decimal conversion. Unfortunately, it performs truncation instead of rounding. It should be great to support an optional flag to that code, allowing to do either truncation or rounding depending on the applications.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.