| 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()); |
no test coverage detected