Skip to content

Commit

Permalink
support allowDecimalPrecisionLoss
Browse files Browse the repository at this point in the history
Signed-off-by: Yuan Zhou <[email protected]>
  • Loading branch information
zhouyuan committed May 6, 2024
1 parent 9e2ec55 commit d5c8f5b
Show file tree
Hide file tree
Showing 6 changed files with 2,650 additions and 2 deletions.
2 changes: 2 additions & 0 deletions cpp/core/config/GlutenConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ const std::string kLegacySize = "spark.sql.legacy.sizeOfNull";

const std::string kSessionTimezone = "spark.sql.session.timeZone";

const std::string kAllowPrecisionLoss = "spark.sql.decimalOperations.allowPrecisionLoss";

const std::string kIgnoreMissingFiles = "spark.sql.files.ignoreMissingFiles";

const std::string kDefaultSessionTimezone = "spark.gluten.sql.session.timeZone.default";
Expand Down
2 changes: 2 additions & 0 deletions cpp/velox/compute/WholeStageResultIterator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -490,6 +490,8 @@ std::unordered_map<std::string, std::string> WholeStageResultIterator::getQueryC
}
// Adjust timestamp according to the above configured session timezone.
configs[velox::core::QueryConfig::kAdjustTimestampToTimezone] = "true";
// To align with Spark's behavior, allow decimal precision loss or not.
configs[velox::core::QueryConfig::kAllowPrecisionLoss] = "true";
// Align Velox size function with Spark.
configs[velox::core::QueryConfig::kSparkLegacySizeOfNull] = std::to_string(veloxCfg_->get<bool>(kLegacySize, true));

Expand Down
4 changes: 2 additions & 2 deletions ep/build-velox/src/get_velox.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@

set -exu

VELOX_REPO=https://github.com/oap-project/velox.git
VELOX_BRANCH=2024_05_06
VELOX_REPO=https://github.com/zhouyuan/velox.git
VELOX_BRANCH=wip_decimal_precision_loss
VELOX_HOME=""

#Set on run gluten on HDFS
Expand Down
Loading

0 comments on commit d5c8f5b

Please sign in to comment.