| 75 | } |
| 76 | |
| 77 | std::optional<int32_t> numRowsOrFuture(ContinueFuture* future) { |
| 78 | std::lock_guard<std::mutex> l(mutex_); |
| 79 | BOLT_CHECK(!cancelled_, "Getting data after the build side is aborted"); |
| 80 | if (numRows_.has_value()) { |
| 81 | return numRows_; |
| 82 | } |
| 83 | promises_.emplace_back("CustomJoinBridge::numRowsOrFuture"); |
| 84 | *future = promises_.back().getSemiFuture(); |
| 85 | return std::nullopt; |
| 86 | } |
| 87 | |
| 88 | private: |
| 89 | std::optional<int32_t> numRows_; |