Skip to content

Commit

Permalink
Add the spill compress config
Browse files Browse the repository at this point in the history
  • Loading branch information
jinchengchenghh committed Oct 30, 2023
1 parent a7b68c3 commit 2f4d22b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions cpp/velox/compute/WholeStageResultIterator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ const std::string kSpillStartPartitionBit = "spark.gluten.sql.columnar.backend.v
const std::string kSpillPartitionBits = "spark.gluten.sql.columnar.backend.velox.spillPartitionBits";
const std::string kSpillableReservationGrowthPct =
"spark.gluten.sql.columnar.backend.velox.spillableReservationGrowthPct";
const std::string kSpillCompressionKind = "spark.io.compression.codec";
const std::string kMaxPartialAggregationMemoryRatio =
"spark.gluten.sql.columnar.backend.velox.maxPartialAggregationMemoryRatio";
const std::string kMaxExtendedPartialAggregationMemoryRatio =
Expand Down Expand Up @@ -365,6 +366,7 @@ std::unordered_map<std::string, std::string> WholeStageResultIterator::getQueryC
configs[velox::core::QueryConfig::kJoinSpillPartitionBits] = getConfigValue(confMap_, kSpillPartitionBits, "2");
configs[velox::core::QueryConfig::kSpillableReservationGrowthPct] =
getConfigValue(confMap_, kSpillableReservationGrowthPct, "25");
configs[velox::core::QueryConfig::kSpillCompressionKind] = getConfigValue(confMap_, kSpillCompressionKind, "lz4");
} catch (const std::invalid_argument& err) {
std::string errDetails = err.what();
throw std::runtime_error("Invalid conf arg: " + errDetails);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,8 @@ object GlutenConfig {
GLUTEN_SHUFFLE_WRITER_BUFFER_SIZE,
SQLConf.SESSION_LOCAL_TIMEZONE.key,
GLUTEN_DEFAULT_SESSION_TIMEZONE_KEY,
SQLConf.LEGACY_SIZE_OF_NULL.key
SQLConf.LEGACY_SIZE_OF_NULL.key,
"spark.io.compression.codec"
)
keys.forEach(
k => {
Expand Down

0 comments on commit 2f4d22b

Please sign in to comment.