apache / apache/arrow

[Gandiva] Add overflow checks for decimals

Open
#21,116 1 comment 0 reactions 0 assignees View on GitHub
Component: Gandiva Type: bug
Dominant language
C++
Stars
17.1k
Forks
4.3k
Avg merge
3d 13h
Merged PRs (30d)
88

Description

For decimals, overflows can occur at two places :
1. input array can have values that are outside the bound (eg. > 38 digits)
1. When an operation can result in overflows. eg. add of two decimals of (38, 6) can result in an overflow, if the input numbers are very large.

In both the above cases, just verifying that an overflow occurred can be a perf overhead. We should do this based on a conf variable.

**Reporter**: [Pindikura Ravindra](https://issues.apache.org/jira/browse/ARROW-4570) / @pravindra

**Note**: *This issue was originally created as [ARROW-4570](https://issues.apache.org/jira/browse/ARROW-4570). Please see the [migration documentation](https://github.com/apache/arrow/issues/14542) for further details.*

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.