Skip to content

Commit 77c1755

Browse files
committed
support allowDecimalPrecisionLoss
Signed-off-by: Yuan Zhou <[email protected]>
1 parent 8d735d1 commit 77c1755

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

cpp/velox/compute/WholeStageResultIterator.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,8 @@ std::unordered_map<std::string, std::string> WholeStageResultIterator::getQueryC
288288
configs[velox::core::QueryConfig::kCastToIntByTruncate] = std::to_string(true);
289289
// To align with Spark's behavior, allow decimal in casting string to int.
290290
configs[velox::core::QueryConfig::kCastIntAllowDecimal] = std::to_string(true);
291+
// To align with Spark's behavior, allow decimal precision loss or not.
292+
configs[velox::core::QueryConfig::kAllowPrecisionLoss] = getConfigValue(confMap_, kAllowPrecisionLoss, "true");;
291293
auto defaultTimezone = getConfigValue(confMap_, kDefaultSessionTimezone, "");
292294
configs[velox::core::QueryConfig::kSessionTimezone] = getConfigValue(confMap_, kSessionTimezone, defaultTimezone);
293295
// Adjust timestamp according to the above configured session timezone.

ep/build-velox/src/get_velox.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616

1717
set -exu
1818

19-
VELOX_REPO=https://github.com/oap-project/velox.git
20-
VELOX_BRANCH=main
19+
VELOX_REPO=https://github.com/zhouyuan/velox.git
20+
VELOX_BRANCH=wip_decimal_precision_loss
2121
VELOX_HOME=""
2222

2323
#Set on run gluten on HDFS

0 commit comments

Comments
 (0)