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

Method HashBuild

bolt/exec/HashBuild.cpp:73–208  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

71} // namespace
72
73HashBuild::HashBuild(
74 int32_t operatorId,
75 DriverCtx* driverCtx,
76 std::shared_ptr<const core::HashJoinNode> joinNode)
77 : Operator(
78 driverCtx,
79 nullptr,
80 operatorId,
81 joinNode->id(),
82 "HashBuild",
83 joinNode->canSpill(driverCtx->queryConfig())
84 ? driverCtx->makeSpillConfig(operatorId)
85 : std::nullopt),
86 joinNode_(std::move(joinNode)),
87 joinType_{joinNode_->joinType()},
88 nullAware_{joinNode_->isNullAware()},
89 joinBridge_(operatorCtx_->task()->getHashJoinBridgeLocked(
90 operatorCtx_->driverCtx()->splitGroupId,
91 planNodeId())),
92 spillMemoryThreshold_(
93 operatorCtx_->driverCtx()->queryConfig().joinSpillMemoryThreshold()),
94 abandonBuildNoDupHashMinRows_(
95 driverCtx->queryConfig().abandonBuildNoDupHashMinRows()),
96 abandonBuildNoDupHashMinPct_(
97 driverCtx->queryConfig().abandonBuildNoDupHashMinPct()),
98 keyChannelMap_(joinNode_->rightKeys().size()),
99 supportRangePartitionSkewed_(
100 driverCtx->queryConfig().isHashJoinSkewedPartitionEnabled()),
101 skewFileSizeRatioThreshold_(
102 driverCtx->queryConfig().skewFileSizeRatioThreshold()),
103 skewRowCountRatioThreshold_(
104 driverCtx->queryConfig().skewRowCountRatioThreshold()),
105 isDREnabled_(operatorCtx_->driverCtx()
106 ->queryConfig()
107 .isDataRetentionUpdateEnabled()) {
108 BOLT_CHECK(pool()->trackUsage());
109 BOLT_CHECK_NOT_NULL(joinBridge_);
110
111 spillGroup_ = spillEnabled()
112 ? operatorCtx_->task()->getSpillOperatorGroupLocked(
113 operatorCtx_->driverCtx()->splitGroupId, planNodeId())
114 : nullptr;
115
116 if (isDREnabled_) {
117 LOG(INFO) << __FUNCTION__ << ": isDREnabled_ = " << isDREnabled_;
118 }
119 joinBridge_->addBuilder();
120 if (auto opaqueHashTable = joinNode_->reusableHashTable()) {
121 TestValue::adjust("bytedance::bolt::exec::HashBuild::HashBuild", this);
122 setReusableHashTable(opaqueHashTable);
123 return;
124 }
125
126 auto inputType = joinNode_->sources()[1]->outputType();
127
128 const auto numKeys = joinNode_->rightKeys().size();
129 keyChannels_.reserve(numKeys);
130 std::vector<std::string> names;

Callers

nothing calls this directly

Calls 15

exprToChannelFunction · 0.85
canDropDuplicatesFunction · 0.85
RuntimeCounterClass · 0.85
ROWFunction · 0.85
makeSpillConfigMethod · 0.80
isNullAwareMethod · 0.80
taskMethod · 0.80

Tested by

no test coverage detected