Skip to content

Commit

Permalink
Revert "Disable check for an compatibility issue with Spark3.2"
Browse files Browse the repository at this point in the history
This reverts commit 2bb887e.
  • Loading branch information
rui-mo committed Feb 4, 2024
1 parent 5a29a19 commit bf07fed
Showing 1 changed file with 10 additions and 13 deletions.
23 changes: 10 additions & 13 deletions velox/functions/sparksql/specialforms/DecimalRound.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,19 +37,16 @@ class DecimalRoundFunction : public exec::VectorFunction {
inputScale_(inputScale),
resultPrecision_(resultPrecision),
resultScale_(resultScale) {
// const auto [p, s] =
// DecimalRoundCallToSpecialForm::getResultPrecisionScale(
// inputPrecision, inputScale, scale);
// VELOX_USER_CHECK_EQ(
// p,
// resultPrecision,
// "The result precision of decimal_round is inconsistent with Spark
// expected.");
// VELOX_USER_CHECK_EQ(
// s,
// resultScale,
// "The result scale of decimal_round is inconsistent with Spark
// expected.");
const auto [p, s] = DecimalRoundCallToSpecialForm::getResultPrecisionScale(
inputPrecision, inputScale, scale);
VELOX_USER_CHECK_EQ(
p,
resultPrecision,
"The result precision of decimal_round is inconsistent with Spark expected.");
VELOX_USER_CHECK_EQ(
s,
resultScale,
"The result scale of decimal_round is inconsistent with Spark expected.");

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

0 comments on commit bf07fed

Please sign in to comment.