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

Method tableOrFuture

bolt/exec/HashJoinBridge.cpp:117–133  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

115}
116
117std::optional<HashJoinBridge::HashBuildResult> HashJoinBridge::tableOrFuture(
118 ContinueFuture* future) {
119 std::lock_guard<std::mutex> l(mutex_);
120 BOLT_CHECK(started_);
121 BOLT_CHECK(!cancelled_, "Getting hash table after join is aborted");
122 BOLT_CHECK(
123 !buildResult_.has_value() ||
124 (!restoringSpillPartitionId_.has_value() &&
125 restoringSpillShards_.empty()));
126
127 if (buildResult_.has_value()) {
128 return buildResult_.value();
129 }
130 promises_.emplace_back("HashJoinBridge::tableOrFuture");
131 *future = promises_.back().getSemiFuture();
132 return std::nullopt;
133}
134
135bool HashJoinBridge::probeFinished() {
136 std::vector<ContinuePromise> promises;

Callers 2

asyncWaitForHashTableMethod · 0.80
TEST_PFunction · 0.80

Calls 4

has_valueMethod · 0.80
backMethod · 0.80
emptyMethod · 0.45
valueMethod · 0.45

Tested by 1

TEST_PFunction · 0.64