Skip to content

Commit

Permalink
fixed clang
Browse files Browse the repository at this point in the history
  • Loading branch information
razajafri committed Dec 12, 2023
1 parent 81f82af commit 96a9297
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/main/cpp/src/decimal_utils.cu
Original file line number Diff line number Diff line change
Expand Up @@ -682,10 +682,10 @@ struct dec128_multiplier {
int mult_scale = a_scale + b_scale;

// According to https://issues.apache.org/jira/browse/SPARK-40129
// and https://issues.apache.org/jira/browse/SPARK-45786, Spark has a bug in versions 3.2.4, 3.3.3, 3.4.1, 3.5.0
// and 4.0.0
// The bug is fixed for later versions but to match the legacy behavior we need to first round the result to a
// precision of 38 then we need to round the result to the final scale that we care about.
// and https://issues.apache.org/jira/browse/SPARK-45786, Spark has a bug in
// versions 3.2.4, 3.3.3, 3.4.1, 3.5.0 and 4.0.0 The bug is fixed for later versions but to
// match the legacy behavior we need to first round the result to a precision of 38 then we need
// to round the result to the final scale that we care about.
if (cast_interim_result) {
int first_div_precision = dec_precision - 38;
if (first_div_precision > 0) {
Expand Down

0 comments on commit 96a9297

Please sign in to comment.