-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
planner: fix error when select view_name.col_name from view_name #14314
Conversation
/run-all-tests |
/run-all-tests |
/run-unit-test |
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.
LGTM
origColName := name.ColName | ||
if tableInfo.View.Cols != nil { | ||
origColName = tableInfo.View.Cols[i] | ||
} | ||
projNames = append(projNames, &types.FieldName{ | ||
TblName: name.TblName, |
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.
Add a comment here for explanation?
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.
lgtm
/run-all-tests |
/merge |
/run-all-tests |
cherry pick to release-3.0 failed |
What problem does this PR solve?
Before this commit:
What is changed and how it works?
We build a projection upon the underlying select when execute
select from a view
.The output name of the built projection should be
view_name.col_name
instead ofunderlying_table_name.col_name
.Check List
Tests
Code changes
Side effects
N/A
Related changes
release-3.0, release-3.1
Release note
Fix an error when executing SQL like
select view_name.col_name from view_name
.