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

Method noMoreInput

bolt/exec/NestedLoopJoinBuild.cpp:120–160  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

118}
119
120void NestedLoopJoinBuild::noMoreInput() {
121 Operator::noMoreInput();
122 std::vector<ContinuePromise> promises;
123 std::vector<std::shared_ptr<Driver>> peers;
124 // The last Driver to hit NestedLoopJoinBuild::finish gathers the data from
125 // all build Drivers and hands it over to the probe side. At this
126 // point all build Drivers are continued and will free their
127 // state. allPeersFinished is true only for the last Driver of the
128 // build pipeline.
129 if (!operatorCtx_->task()->allPeersFinished(
130 planNodeId(), operatorCtx_->driver(), &future_, promises, peers)) {
131 return;
132 }
133
134 {
135 auto promisesGuard = folly::makeGuard([&]() {
136 // Realize the promises so that the other Drivers (which were not
137 // the last to finish) can continue from the barrier and finish.
138 peers.clear();
139 for (auto& promise : promises) {
140 promise.setValue();
141 }
142 });
143
144 for (auto& peer : peers) {
145 auto op = peer->findOperator(planNodeId());
146 auto* build = dynamic_cast<NestedLoopJoinBuild*>(op);
147 BOLT_CHECK_NOT_NULL(build);
148 dataVectors_.insert(
149 dataVectors_.begin(),
150 build->dataVectors_.begin(),
151 build->dataVectors_.end());
152 }
153 }
154
155 dataVectors_ = mergeDataVectors();
156 operatorCtx_->task()
157 ->getNestedLoopJoinBridge(
158 operatorCtx_->driverCtx()->splitGroupId, planNodeId())
159 ->setData(std::move(dataVectors_));
160}
161
162bool NestedLoopJoinBuild::isFinished() {
163 return !future_.valid() && noMoreInput_;

Callers

nothing calls this directly

Calls 12

allPeersFinishedMethod · 0.80
taskMethod · 0.80
driverMethod · 0.80
findOperatorMethod · 0.80
clearMethod · 0.45
setValueMethod · 0.45
insertMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
setDataMethod · 0.45
driverCtxMethod · 0.45

Tested by

no test coverage detected