save-buffer commented on code in PR #13332:
URL: https://github.com/apache/arrow/pull/13332#discussion_r892765981
##########
cpp/src/arrow/compute/exec/hash_join.cc:
##########
@@ -789,159 +603,30 @@ class HashJoinBasicImpl : public HashJoinImpl {
return Status::OK();
}
- Status BuildBloomFilter_on_finished(size_t thread_index) {
- if (cancelled_) return Status::Cancelled("Hash join cancelled");
- ARROW_DCHECK(pushdown_target_);
- RETURN_NOT_OK(pushdown_target_->PushBloomFilter(
- thread_index, std::move(bloom_filter_), std::move(column_map_)));
- return BuildHashTable(thread_index);
- }
-
Status BuildHashTable_on_finished(size_t thread_index) {
- if (cancelled_) {
- return Status::Cancelled("Hash join cancelled");
- }
-
- right_batches_.clear();
-
- bool proceed;
- {
- std::lock_guard<std::mutex> lock(left_batches_mutex_);
- std::lock_guard<std::mutex> lock_finish(finished_mutex_);
- left_queue_bloom_finished_ =
- left_queue_bloom_finished_ || num_expected_bloom_filters_ == 0;
- proceed = !has_hash_table_ && left_queue_bloom_finished_;
- has_hash_table_ = true;
- }
- if (proceed) RETURN_NOT_OK(ProbeQueuedBatches(thread_index));
-
- return Status::OK();
- }
-
- void RegisterBuildBloomFilter() {
- task_group_bloom_ = scheduler_->RegisterTaskGroup(
- [this](size_t thread_index, int64_t task_id) -> Status {
- return BuildBloomFilter_exec_task(thread_index, task_id);
- },
- [this](size_t thread_index) -> Status {
- return BuildBloomFilter_on_finished(thread_index);
- });
- }
-
- void RegisterBuildHashTable() {
- task_group_build_ = scheduler_->RegisterTaskGroup(
- [this](size_t thread_index, int64_t task_id) -> Status {
- return BuildHashTable_exec_task(thread_index, task_id);
- },
- [this](size_t thread_index) -> Status {
- return BuildHashTable_on_finished(thread_index);
- });
+ build_batches_.Clear();
Review Comment:
Done
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]