NVIDIA / NVIDIA/cudf

[FEA] Add java tests for SUM_OVERFLOW reduction on signed integers and decimals

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

Description

**Is your feature request related to a problem? Please describe.**
#22465 extends the C++ `SUM_OVERFLOW` reduction from being INT64-only to supporting all signed integer types (`INT8`, `INT16`, `INT32`, `INT64`) as well as all decimal types (`DECIMAL32`, `DECIMAL64`, `DECIMAL128`). The Java bindings already expose this aggregation, but the existing tests were written under the previous INT64-only assumption.

**Describe the solution you'd like**
_originally proposed by @mythrocks at https://github.com/rapidsai/cudf/pull/22465#discussion_r3269949375_:

In https://github.com/rapidsai/cudf/blob/main/java/src/test/java/ai/rapids/cudf/ReductionTest.java

1. Generalize the `SumOverflowResult` / `readSumOverflow` helper so the result's sum child can be read for non-INT64 types.
2. Add `testSumOverflowSignedIntegralTypes` covering non-overflowing cases for `INT8`, `INT16`, `INT32`, `INT64`.
3. Add `testSumOverflowSignedDecimalTypes` covering non-overflowing cases for `DECIMAL32`, `DECIMAL64`, `DECIMAL128`.

Both new methods should call the generalized helper to verify the overflow flag is false and the sum child matches the expected value.

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.