-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Correct Handling of UNION Queries with Literals in the Vitess Planner #16227
Conversation
Review ChecklistHello reviewers! 👋 Please follow this checklist when reviewing this Pull Request. General
Tests
Documentation
New flags
If a workflow is added or modified:
Backward compatibility
|
Signed-off-by: Andres Taylor <[email protected]>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #16227 +/- ##
==========================================
+ Coverage 68.40% 68.61% +0.20%
==========================================
Files 1556 1544 -12
Lines 195121 197992 +2871
==========================================
+ Hits 133479 135844 +2365
- Misses 61642 62148 +506 ☔ View full report in Codecov by Sentry. |
Once an offset has been shared with the outside, we need to not truncate away that column Signed-off-by: Florent Poinsard <[email protected]> Signed-off-by: Andres Taylor <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. Should we merge this to release-20.0
/-rc
since it's a bug fix?
Signed-off-by: Andres Taylor <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Earlier, we wanted the truncation to happen only at the topmost operator that supported truncation. With the current changes, is there a case where the truncation is done by multiple operators?
Description
The Vitess planner was previously unable to handle UNION queries that included literals, resulting in an error. For example, the following query:
Results in:
Solution:
To address this issue, the solution ensures that all operators that truncate columns actually perform the truncation during the planning phase. This alignment guarantees that the argument offsets match correctly for UNION queries, preventing the aforementioned error.
Related Issue(s)
Fixes #16228
Checklist
Deployment Notes