-
Notifications
You must be signed in to change notification settings - Fork 68
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
DB-12365 Fix a regression caused by DB-12158 #5699
Open
ascend1
wants to merge
1
commit into
master
Choose a base branch
from
DB-12365
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains 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
The check on column names has to be removed due to the possibility of renaming columns names in defining views.
This was referenced Jul 20, 2021
jenkins please test branch @cdh6.3.0,skipTestsLongerThan2Minutes |
msirek
approved these changes
Jul 20, 2021
jenkins please test branch @cdh6.3.0,skipTestsLongerThan2Minutes |
jpanko1
approved these changes
Jul 21, 2021
carolp-503
approved these changes
Jul 21, 2021
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.
+1
jenkins please test branch @cdh6.3.0,skipTestsLongerThan2Minutes |
TEST SUCCEEDED +1 |
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.
Short Description
This change fixes a regression caused by DB-12158.
3.1 PR: #5700
3.0 PR: #5701
Long Description
DB-12158 adds a new check on matching column names in binding
FromSubquery
. It was added for cases where column count matches, but concrete columns do not because of previous add/drop column operations.It turned out that the check has to be removed due to the possibility of renaming columns names in defining views. In select statement, there is no way to tell if the column names are different due to alter table operations or just renaming in view definition. Checking column positions are also not possible because view columns are always 1, 2, 3, .... It has to be this way because underlying select could have generated columns that do no exists in any base tables at all. As a result, when automatic view refreshing mode is off, selecting an obsolete view may return a result with wrong column names. This is the same behavior as before DB-12158 and wanted to be fixed, but now just falls back to previous behavior again.
How to test
See modification of
testAutomaticViewRefreshingOff
. Also, see new test on views with renamed columns intestAutomaticViewRefreshingOn_SelectStarViewWithRenamedColumns
.