IMPALA-14714: Fix incorrect results for anti-join with constant ON cl…#10
Open
zhangyifan27 wants to merge 1 commit intomasterfrom
Open
IMPALA-14714: Fix incorrect results for anti-join with constant ON cl…#10zhangyifan27 wants to merge 1 commit intomasterfrom
zhangyifan27 wants to merge 1 commit intomasterfrom
Conversation
…ause predicates This patch fixes incorrect query results when using LEFT/RIGHT ANTI JOIN with constant predicates in the ON clause (e.g., ON FALSE or ON TRUE). Previously, constant anti-join predicates were incorrectly handled: - They were marking the entire query as having an empty result set - They were being assigned to scan nodes instead of join nodes - They were being migrated into inline views incorrectly The fix adds special handling for anti-join conjuncts in Analyzer to: 1. Skip them in markConstantConjunct() to avoid marking query as empty 2. Route constant ON clause predicates to canEvalOnClauseConjunct() 3. Ensure constant anti-join predicates are evaluated at join nodes 4. Prevent migration of anti-join predicates into inline views Testing: - Added comprehensive test cases covering ON FALSE, ON TRUE, and mixed predicates for both LEFT and RIGHT ANTI JOIN Change-Id: I0e0f4a69263bb0ff11f421a1a340dffb904c6842
96925d4 to
c1b6dbc
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…ause predicates
This patch fixes incorrect query results when using LEFT/RIGHT ANTI JOIN with constant predicates in the ON clause (e.g., ON FALSE or ON TRUE).
Previously, constant anti-join predicates were incorrectly handled:
The fix adds special handling for anti-join conjuncts in Analyzer to:
Testing:
Change-Id: I0e0f4a69263bb0ff11f421a1a340dffb904c6842