Skip to content

Conversation

@dh20
Copy link
Contributor

@dh20 dh20 commented Dec 26, 2025

Which issue does this PR close?

Closes #1792

Rationale for this change

Keep the null result in the reverse connection result

What changes are included in this PR?

Are there any user-facing changes?

How was this patch tested?

cluster test

@cxzl25 cxzl25 requested a review from Copilot December 26, 2025 10:57
@cxzl25 cxzl25 changed the title Keep the null result in the reverse connection result [AURON #1792] Keep the null result in the reverse connection result Dec 26, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes a bug in Left Anti Join handling where NULL join keys were incorrectly included in the result set. The fix ensures NULL join keys are filtered out from Anti join results, which aligns with SQL NOT IN semantics where NULL NOT IN (...) evaluates to NULL (treated as false).

Key Changes

  • Added explicit NULL join key handling for Anti joins that filters out rows with NULL keys
  • Refactored the key validity check to be computed once before the conditional logic

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +197 to +200
if P.mode == Anti && P.probe_is_join_side && !key_is_valid {
probed_joined.set(row_idx, true);
continue;
}
Copy link

Copilot AI Dec 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Left connection failure

1 participant