Skip to content

Fix wrong results with IS NULL and minmax pushdown - #10398

Open
svenklemm wants to merge 1 commit into
mainfrom
sven/isnull_minmax
Open

Fix wrong results with IS NULL and minmax pushdown#10398
svenklemm wants to merge 1 commit into
mainfrom
sven/isnull_minmax

Conversation

@svenklemm

Copy link
Copy Markdown
Member

A qual like (v > 0) IS NULL wrapped an operator whose minmax pushdown is
a lossy, false-positive-only approximation. Wrapping that lossy result in
a NullTest could turn a false positive into a false negative and skip a
batch that actually holds matching rows, so the query returned wrong
results.

Only push down NullTest and the other transforming nodes when their child
is pushed down exactly, never when the child still needs a recheck.

Fixes #9921

A qual like (v > 0) IS NULL wrapped an operator whose minmax pushdown is
a lossy, false-positive-only approximation. Wrapping that lossy result in
a NullTest could turn a false positive into a false negative and skip a
batch that actually holds matching rows, so the query returned wrong
results.

Only push down NullTest and the other transforming nodes when their child
is pushed down exactly, never when the child still needs a recheck.

Fixes #9921
@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown

@Poroma-Banerjee, @melihmutlu: please review this pull request.

Powered by pull-review

@codecov

codecov Bot commented Aug 3, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

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.

wrong result with IS NULL and minmax sparse index pushdown

3 participants