Skip to content

Commit bf07fed

Browse files
committed
Revert "Disable check for an compatibility issue with Spark3.2"
This reverts commit 2bb887e.
1 parent 5a29a19 commit bf07fed

File tree

1 file changed

+10
-13
lines changed

1 file changed

+10
-13
lines changed

velox/functions/sparksql/specialforms/DecimalRound.cpp

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -37,19 +37,16 @@ class DecimalRoundFunction : public exec::VectorFunction {
3737
inputScale_(inputScale),
3838
resultPrecision_(resultPrecision),
3939
resultScale_(resultScale) {
40-
// const auto [p, s] =
41-
// DecimalRoundCallToSpecialForm::getResultPrecisionScale(
42-
// inputPrecision, inputScale, scale);
43-
// VELOX_USER_CHECK_EQ(
44-
// p,
45-
// resultPrecision,
46-
// "The result precision of decimal_round is inconsistent with Spark
47-
// expected.");
48-
// VELOX_USER_CHECK_EQ(
49-
// s,
50-
// resultScale,
51-
// "The result scale of decimal_round is inconsistent with Spark
52-
// expected.");
40+
const auto [p, s] = DecimalRoundCallToSpecialForm::getResultPrecisionScale(
41+
inputPrecision, inputScale, scale);
42+
VELOX_USER_CHECK_EQ(
43+
p,
44+
resultPrecision,
45+
"The result precision of decimal_round is inconsistent with Spark expected.");
46+
VELOX_USER_CHECK_EQ(
47+
s,
48+
resultScale,
49+
"The result scale of decimal_round is inconsistent with Spark expected.");
5350

5451
// Decide the rescale factor of divide and multiply when rounding to a
5552
// negative scale.

0 commit comments

Comments
 (0)