| 1238 | } |
| 1239 | |
| 1240 | core::PlanNodePtr createLocalPartitionNode( |
| 1241 | const core::PlanNodeId& planNodeId, |
| 1242 | const std::vector<core::TypedExprPtr>& keys, |
| 1243 | const std::vector<core::PlanNodePtr>& sources, |
| 1244 | memory::MemoryPool* pool) { |
| 1245 | auto partitionFunctionFactory = |
| 1246 | createPartitionFunctionSpec(sources[0]->outputType(), keys, pool); |
| 1247 | return std::make_shared<core::LocalPartitionNode>( |
| 1248 | planNodeId, |
| 1249 | keys.empty() ? core::LocalPartitionNode::Type::kGather |
| 1250 | : core::LocalPartitionNode::Type::kRepartition, |
| 1251 | partitionFunctionFactory, |
| 1252 | sources); |
| 1253 | } |
| 1254 | } // namespace |
| 1255 | |
| 1256 | PlanBuilder& PlanBuilder::partitionedOutput( |
no test coverage detected