MCPcopy Create free account
hub / github.com/apache/arrow / InputReceived

Method InputReceived

cpp/src/arrow/acero/hash_join_node.cc:902–926  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

900 }
901
902 Status InputReceived(ExecNode* input, ExecBatch batch) override {
903 auto scope = TraceInputReceived(batch);
904 ARROW_DCHECK(std::find(inputs_.begin(), inputs_.end(), input) != inputs_.end());
905 if (complete_.load()) {
906 return Status::OK();
907 }
908
909 size_t thread_index = plan_->query_context()->GetThreadIndex();
910 int side = (input == inputs_[0]) ? 0 : 1;
911
912 if (side == 0) {
913 ARROW_RETURN_NOT_OK(OnProbeSideBatch(thread_index, std::move(batch)));
914 } else {
915 ARROW_RETURN_NOT_OK(OnBuildSideBatch(thread_index, std::move(batch)));
916 }
917
918 if (batch_count_[side].Increment()) {
919 if (side == 0) {
920 return OnProbeSideFinished(thread_index);
921 } else {
922 return OnBuildSideFinished(thread_index);
923 }
924 }
925 return Status::OK();
926 }
927
928 Status InputFinished(ExecNode* input, int total_batches) override {
929 ARROW_DCHECK(std::find(inputs_.begin(), inputs_.end(), input) != inputs_.end());

Callers 1

OutputBatchCallbackMethod · 0.45

Calls 6

GetThreadIndexMethod · 0.80
query_contextMethod · 0.80
OKFunction · 0.50
beginMethod · 0.45
endMethod · 0.45
loadMethod · 0.45

Tested by

no test coverage detected