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

Method isBlocked

bolt/exec/NestedLoopJoinProbe.cpp:142–178  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

140}
141
142BlockingReason NestedLoopJoinProbe::isBlocked(ContinueFuture* future) {
143 switch (state_) {
144 case ProbeOperatorState::kRunning:
145 [[fallthrough]];
146 case ProbeOperatorState::kFinish:
147 return BlockingReason::kNotBlocked;
148 case ProbeOperatorState::kWaitForPeers:
149 if (future_.valid()) {
150 *future = std::move(future_);
151 return BlockingReason::kWaitForJoinProbe;
152 }
153 setState(ProbeOperatorState::kFinish);
154 return BlockingReason::kNotBlocked;
155 case ProbeOperatorState::kWaitForBuild: {
156 BOLT_CHECK(!buildVectors_.has_value());
157 if (!getBuildData(future)) {
158 return BlockingReason::kWaitForJoinBuild;
159 }
160 BOLT_CHECK(buildVectors_.has_value());
161
162 // If we just got build data, check if this is a right or full join where
163 // we need to hit track of hits on build records. If it is, initialize the
164 // selectivity vectors that do so.
165 if (needsBuildMismatch(joinType_)) {
166 buildMatched_.resize(buildVectors_->size());
167 for (auto i = 0; i < buildVectors_->size(); ++i) {
168 buildMatched_[i].resizeFill(buildVectors_.value()[i]->size(), false);
169 }
170 }
171
172 setState(ProbeOperatorState::kRunning);
173 return BlockingReason::kNotBlocked;
174 }
175 default:
176 BOLT_UNREACHABLE(probeOperatorStateName(state_));
177 }
178}
179
180void NestedLoopJoinProbe::close() {
181 if (joinCondition_ != nullptr) {

Callers

nothing calls this directly

Calls 8

needsBuildMismatchFunction · 0.85
probeOperatorStateNameFunction · 0.85
has_valueMethod · 0.80
resizeFillMethod · 0.80
validMethod · 0.45
resizeMethod · 0.45
sizeMethod · 0.45
valueMethod · 0.45

Tested by

no test coverage detected