Copilot commented on code in PR #1793:
URL: https://github.com/apache/auron/pull/1793#discussion_r2648033932


##########
native-engine/datafusion-ext-plans/src/joins/bhj/semi_join.rs:
##########
@@ -189,11 +189,16 @@ impl<const P: JoinerParams> Joiner for SemiJoiner<P> {
         let mut hashes_idx = 0;
 
         for row_idx in 0..probed_batch.num_rows() {
-            if probed_valids
+            let key_is_valid =
+            probed_valids
                 .as_ref()
                 .map(|nb| nb.is_valid(row_idx))
-                .unwrap_or(true)
-            {
+                .unwrap_or(true);
+            if P.mode == Anti && P.probe_is_join_side && !key_is_valid {
+                probed_joined.set(row_idx, true);
+                continue;
+            }

Review Comment:
   This fix correctly handles NULL join keys in Anti joins by filtering them 
out, which matches SQL NOT IN semantics. However, there's no test coverage for 
this specific scenario. Consider adding a test case for Anti joins with NULL 
join keys to prevent regression. The existing test in test.rs (join_anti 
function) only tests non-null keys.



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

Reply via email to