thinkharderdev commented on code in PR #12523:
URL: https://github.com/apache/datafusion/pull/12523#discussion_r1769221343


##########
datafusion/physical-plan/src/joins/hash_join.rs:
##########
@@ -131,8 +192,29 @@ impl JoinLeftData {
     /// Decrements the counter of running threads, and returns `true`
     /// if caller is the last running thread
     fn report_probe_completed(&self) -> bool {
-        self.probe_threads_counter.fetch_sub(1, Ordering::Relaxed) == 1
+        self.probe_threads_counter.load(Ordering::Relaxed) == 0
+            || self.probe_threads_counter.fetch_sub(1, Ordering::Relaxed) == 1
+    }
+}
+
+fn merge_bitmap(m1: &mut BooleanBufferBuilder, m2: BooleanBuffer) -> 
Result<()> {

Review Comment:
   Correct. What will be shared and merged is the 
`JoinLeftData::visited_indices_bitmap`



-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to