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

ISSUES-2786 fix replace asterisk with join query #2787

Merged
merged 3 commits into from
Aug 14, 2018

Conversation

zhang2014
Copy link
Contributor

#2786
I hereby agree to the terms of the CLA available at: https://yandex.ru/legal/cla/?lang=en

@zhang2014 zhang2014 force-pushed the fix/replace_asterisk branch 2 times, most recently from f125da2 to cf294e4 Compare August 2, 2018 06:10
all_columns_name.insert(all_columns_name.begin(), columns_name.begin(), columns_name.end());

NameSet joined_columns;
collectJoinedColumns(joined_columns);
Copy link
Member

Choose a reason for hiding this comment

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

It's better not to call collectJoinedColumns from here because it has side effects.
Actually, we need only columns_from_joined_table. It's created in collectJoinedColumns method, and this code may be extracted to AnalyzedJoin's member function. Also, it's better to add bool flag in order to check that columns_from_joined_table won't be calculated twice.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I can try to finish this part of the work : )

@alexey-milovidov
Copy link
Member

Could you please also provide a setting to turn on old behaviour for compatibility?
Something like asterisk_left_columns_only (= 0 by default)

@zhang2014 zhang2014 force-pushed the fix/replace_asterisk branch 3 times, most recently from 26c7565 to da4e036 Compare August 5, 2018 07:33
@zhang2014
Copy link
Contributor Author

Almost done @alexey-milovidov @KochetovNicolai

@zhang2014 zhang2014 force-pushed the fix/replace_asterisk branch from 626f7de to ecb916d Compare August 5, 2018 08:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants