https://github.com/apache/spark
Revision 910bfc87b2462cecc502782cf427ccdd0a1bc966 authored by Marco Gaido on 05 December 2018, 17:09:47 UTC, committed by Dongjoon Hyun on 05 December 2018, 17:09:47 UTC
## What changes were proposed in this pull request?

When we encode a Decimal from external source we don't check for overflow. That method is useful not only in order to enforce that we can represent the correct value in the specified range, but it also changes the underlying data to the right precision/scale. Since in our code generation we assume that a decimal has exactly the same precision and scale of its data type, missing to enforce it can lead to corrupted output/results when there are subsequent transformations.

## How was this patch tested?

added UT

Closes #23232 from mgaido91/SPARK-26233_2.4.

Authored-by: Marco Gaido <marcogaido91@gmail.com>
Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
1 parent c9fd14c
History
Tip revision: 910bfc87b2462cecc502782cf427ccdd0a1bc966 authored by Marco Gaido on 05 December 2018, 17:09:47 UTC
[SPARK-26233][SQL][BACKPORT-2.4] CheckOverflow when encoding a decimal value
Tip revision: 910bfc8

README.md

back to top