Skip to content

Do not use nullable columns as null filter when converting antijoins to left joins#3355

Merged
angelamayxie merged 4 commits intomainfrom
angela/antijoin_nullable
Dec 23, 2025
Merged

Do not use nullable columns as null filter when converting antijoins to left joins#3355
angelamayxie merged 4 commits intomainfrom
angela/antijoin_nullable

Conversation

@angelamayxie
Copy link
Copy Markdown
Contributor

@angelamayxie angelamayxie commented Dec 23, 2025

fixes dolthub/dolt#10234

When converting an antijoin to a left join, it is normally okay to use a nullable GetField in a null filter. However, we cannot do so if GetField is both nullable and part of an OR expression. There's currently no way of identifying an expression's parent during InspectExpr so we have to be extra safe by not allowing nullable GetFields in null filters at all.

@angelamayxie angelamayxie requested a review from jycor December 23, 2025 20:33
@angelamayxie angelamayxie marked this pull request as ready for review December 23, 2025 20:57
@angelamayxie angelamayxie merged commit d1e6e68 into main Dec 23, 2025
8 checks passed
@angelamayxie angelamayxie deleted the angela/antijoin_nullable branch December 23, 2025 22:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unexpected Anti Join Result

2 participants