diff --git a/velox/core/PlanNode.h b/velox/core/PlanNode.h index bd0d3c76818a..bac4419cc861 100644 --- a/velox/core/PlanNode.h +++ b/velox/core/PlanNode.h @@ -683,7 +683,7 @@ class LocalPartitionNode : public PlanNode { "Local repartitioning node requires at least one source"); } - static std::shared_ptr single( + static std::shared_ptr gather( const PlanNodeId& id, RowTypePtr outputType, std::vector> sources) { diff --git a/velox/exec/LocalPlanner.cpp b/velox/exec/LocalPlanner.cpp index f3d27f02f519..cd5c5c34ee54 100644 --- a/velox/exec/LocalPlanner.cpp +++ b/velox/exec/LocalPlanner.cpp @@ -168,15 +168,7 @@ uint32_t maxDrivers(const DriverFactory& driverFactory) { return count; } for (auto& node : driverFactory.planNodes) { - if (auto aggregation = - std::dynamic_pointer_cast(node)) { - if (aggregation->step() == core::AggregationNode::Step::kFinal || - aggregation->step() == core::AggregationNode::Step::kSingle) { - // final aggregations must run single-threaded - return 1; - } - } else if ( - auto topN = std::dynamic_pointer_cast(node)) { + if (auto topN = std::dynamic_pointer_cast(node)) { if (!topN->isPartial()) { // final topN must run single-threaded return 1;