MCPcopy Create free account
hub / github.com/bytedance/bolt / LocalPartition

Method LocalPartition

bolt/exec/LocalPartition.cpp:386–408  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

384}
385
386LocalPartition::LocalPartition(
387 int32_t operatorId,
388 DriverCtx* ctx,
389 const std::shared_ptr<const core::LocalPartitionNode>& planNode)
390 : Operator(
391 ctx,
392 planNode->outputType(),
393 operatorId,
394 planNode->id(),
395 "LocalPartition"),
396 queues_{
397 ctx->task->getLocalExchangeQueues(ctx->splitGroupId, planNode->id())},
398 numPartitions_{queues_.size()},
399 partitionFunction_(
400 numPartitions_ == 1
401 ? nullptr
402 : planNode->partitionFunctionSpec().create(numPartitions_)) {
403 BOLT_CHECK(numPartitions_ == 1 || partitionFunction_ != nullptr);
404
405 for (auto& queue : queues_) {
406 queue->addProducer();
407 }
408}
409
410LocalPartition::LocalPartition(
411 int32_t operatorId,

Callers

nothing calls this directly

Calls 5

outputTypeMethod · 0.80
addProducerMethod · 0.80
idMethod · 0.45
sizeMethod · 0.45
createMethod · 0.45

Tested by

no test coverage detected