Skip to content
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
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

ascend1
Copy link
Contributor

@ascend1 ascend1 commented Jul 20, 2021

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 in testAutomaticViewRefreshingOn_SelectStarViewWithRenamedColumns.

The check on column names has to be removed due to the possibility
of renaming columns names in defining views.
@ascend1
Copy link
Contributor Author

ascend1 commented Jul 20, 2021

jenkins please test branch @cdh6.3.0,skipTestsLongerThan2Minutes

@cloudspliceci
Copy link
Contributor

@ascend1
Copy link
Contributor Author

ascend1 commented Jul 20, 2021

jenkins please test branch @cdh6.3.0,skipTestsLongerThan2Minutes

@cloudspliceci
Copy link
Contributor

Copy link

@carolp-503 carolp-503 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@ascend1
Copy link
Contributor Author

ascend1 commented Jul 21, 2021

jenkins please test branch @cdh6.3.0,skipTestsLongerThan2Minutes

@cloudspliceci
Copy link
Contributor

TEST SUCCEEDED +1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

5 participants