You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit bed9dcd
Browse filesBrowse the repository at this point in the historyBrowse files
feat: Support null aware hash mark-joins (apache#21585)
## Which issue does this PR close?
- Closesapache#21309.
## Rationale for this change
This change is about correctness/sql completeness, but is also a step
towards better subquery de-correlation.
Before this change, mark joins only produced boolean `true` / `false`
results, so queries such as `(id NOT IN (...)) IS NULL` could return
incorrect results, especially for correlated scalar subqueries.
## What changes are included in this PR?
1. Adds support for null-aware mark joins.
2. Make sure queries that joins that require null awareness go through a
join implementation that supports that.
3. Extends decorrelation so scalar `NOT IN` mark joins use null-aware
semantics when the predicate can be represented as hash join keys.
I pulled tests from existing tests, a DuckDB issue I ran into, the
[Story of Joins (in
HyPer)](https://www.cs.cmu.edu/~15721-f24/papers/Story_of_Joins.pdf)
paper and some AI generated cases.
## Are these changes tested?
1. Existing SLT tests that explicitly showed bad results.
2. New dedicated SLT tests.
5. New unit tests.
## Are there any user-facing changes?
This PR changes planning behavior and introduces more public API around
hash joins, the only new functionality is public function I could find
is the new helper function `build_join_schema_with_null_aware`
## AI Usage
*AI was used in the process of developing this PR, mostly around testing
and planning*
---------
Signed-off-by: Adam Gutglick <[email protected]>
0 commit comments