Dandandan opened a new pull request, #22828:
URL: https://github.com/apache/datafusion/pull/22828

   ## Which issue does this PR close?
   
   - None.
   
   ## Rationale for this change
   
   Right semi and right anti joins only need to know whether each probe-side 
row has at least one build-side match. The existing hash join probe path 
materializes every build-side match before the semi/anti output projection, 
which is unnecessarily expensive for high-fanout build keys.
   
   ## What changes are included in this PR?
   
   - Add existence-only lookup helpers for `JoinHashMap` and `ArrayMap` that 
return at most one build-side match per probe row.
   - Use those helpers for unfiltered `RightSemi` and `RightAnti` hash joins.
   - Keep filtered joins on the existing path because join filters must 
evaluate candidate pairs.
   - Add focused tests for hash collisions and `ArrayMap` duplicate-key 
behavior.
   
   ## Are these changes tested?
   
   - `cargo fmt --all`
   - `cargo test -p datafusion-physical-plan --lib join_right -- --nocapture`
   - `cargo test -p datafusion-physical-plan --lib matching_indices -- 
--nocapture`
   - `cargo clippy --all-targets --all-features -- -D warnings`
   - `cargo bench -p datafusion-physical-plan --features test_utils --bench 
hash_join_semi_anti -- right_semi_fanout100_h1 --sample-size 10 --warm-up-time 
1 --measurement-time 2`
     - `right_semi_fanout100_h1/1000000`: `[804.11 us 830.17 us 888.14 us]`
   
   ## Are there any user-facing changes?
   
   No.


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