Skip to content

Commit

Permalink
[VL] Remove one legacy Velox config used for Spark collect_list funct…
Browse files Browse the repository at this point in the history
…ion (#7826)
  • Loading branch information
PHILO-HE authored Nov 6, 2024
1 parent 3e160bf commit 4fecd1d
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions cpp/velox/compute/WholeStageResultIterator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -430,8 +430,6 @@ std::unordered_map<std::string, std::string> WholeStageResultIterator::getQueryC
std::to_string(veloxCfg_->get<uint32_t>(kSparkBatchSize, 4096));
configs[velox::core::QueryConfig::kMaxOutputBatchRows] =
std::to_string(veloxCfg_->get<uint32_t>(kSparkBatchSize, 4096));
// Find offheap size from Spark confs. If found, set the max memory usage of partial aggregation.
// FIXME this uses process-wise off-heap memory which is not for task
try {
if (veloxCfg_->valueExists(kDefaultSessionTimezone)) {
configs[velox::core::QueryConfig::kSessionTimezone] = veloxCfg_->get<std::string>(kDefaultSessionTimezone, "");
Expand All @@ -443,6 +441,8 @@ std::unordered_map<std::string, std::string> WholeStageResultIterator::getQueryC
configs[velox::core::QueryConfig::kAdjustTimestampToTimezone] = "true";

{
// Find offheap size from Spark confs. If found, set the max memory usage of partial aggregation.
// FIXME this uses process-wise off-heap memory which is not for task
// partial aggregation memory config
auto offHeapMemory = veloxCfg_->get<int64_t>(kSparkTaskOffHeapMemory, facebook::velox::memory::kMaxMemory);
auto maxPartialAggregationMemory =
Expand All @@ -456,8 +456,6 @@ std::unordered_map<std::string, std::string> WholeStageResultIterator::getQueryC
std::to_string(veloxCfg_->get<int32_t>(kAbandonPartialAggregationMinPct, 90));
configs[velox::core::QueryConfig::kAbandonPartialAggregationMinRows] =
std::to_string(veloxCfg_->get<int32_t>(kAbandonPartialAggregationMinRows, 100000));
// Spark's collect_set ignore nulls.
configs[velox::core::QueryConfig::kPrestoArrayAggIgnoreNulls] = "true";
}
// Spill configs
if (spillStrategy_ == "none") {
Expand Down

0 comments on commit 4fecd1d

Please sign in to comment.