Skip to content

Fix incorrect pushdown of expression below join#13114

Merged
martint merged 2 commits intotrinodb:masterfrom
starburstdata:ks/fix_join
Jul 7, 2022
Merged

Fix incorrect pushdown of expression below join#13114
martint merged 2 commits intotrinodb:masterfrom
starburstdata:ks/fix_join

Conversation

@sopel39
Copy link
Copy Markdown
Member

@sopel39 sopel39 commented Jul 7, 2022

PushInequalityFilterExpressionBelowJoin was incorrectly
pushing a projection into the inner side of an outer join.
This is an invalid transformation when the outer join produces
a null for the columns of the inner table in case of a mismatch
and the expression that's pushed down does not preserve nulls.

Fixes #13109

Documentation

(x) No documentation is needed.

Release notes

(x) Release notes entries required with the following suggested text:

# General
* Fix incorrect results for queries involving certain non-equality filters on top of an outer join. ({issue}`13109`)

sopel39 added 2 commits July 7, 2022 13:02
PushInequalityFilterExpressionBelowJoin was incorrectly
pushing a projection into the inner side of an outer join.
This is an invalid transformation when the outer join produces
a null for the columns of the inner table in case of a mismatch
and the expression that's pushed down does not preserve nulls.
@martint martint merged commit 2dc646b into trinodb:master Jul 7, 2022
@github-actions github-actions bot added this to the 389 milestone Jul 7, 2022
@kokosing kokosing deleted the ks/fix_join branch July 10, 2022 18:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

Incorrect LEFT JOIN behavior when combined with WHERE starting in v380

2 participants