Skip to content

Commit 7174d72

Browse files
viiryaclaude
andcommitted
feat: Add null-aware anti join support (Phase 1)
This commit implements Phase 1 of null-aware anti join support for HashJoin LeftAnti operations, enabling correct SQL NOT IN subquery semantics with NULL values. - Add `null_aware: bool` field to HashJoinExec struct - Add validation: null_aware only for LeftAnti, single-column joins - Update all HashJoinExec::try_new() call sites (17 locations) - Add `probe_side_has_null` flag to track NULLs in probe side - Implement NULL detection during probe phase - Filter NULL-key rows during final emission stage - Add early exit when probe side contains NULL - Add 5 test functions with 17 test variants - Test scenarios: probe NULL, build NULL, no NULLs, validation - Add helper function `build_table_two_cols()` for nullable test data For `SELECT * FROM t1 WHERE c1 NOT IN (SELECT c2 FROM t2)`: 1. If c2 contains NULL → return 0 rows (three-valued logic) 2. If c1 is NULL → that row not in output 3. No NULLs → standard anti join behavior - Single-column join keys only - Must manually set null_aware=true (no planner integration yet) - LeftAnti join type only - All 17 null-aware tests passing - All 610 hash join tests passing Addresses issue apache#10583 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
1 parent 209a0a2 commit 7174d72

3 files changed

Lines changed: 354 additions & 1 deletion

File tree

0 commit comments

Comments
 (0)