-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
[Fix](Planner) fix multi phase analysis failed in multi instance environment #22840
Conversation
run buildall |
(From new machine)TeamCity pipeline, clickbench performance test result: |
…ronment substitution
71b9b39
to
dea0368
Compare
run buildall |
run p0 |
run buildall |
run clickbench |
(From new machine)TeamCity pipeline, clickbench performance test result: |
PR approved by at least one committer and no changes requested. |
PR approved by anyone and no changes requested. |
…ronment substitution (apache#22840) Problem: When executing group_concat with order by inside in view, column can not be found when analyze. Example: create view if not exists test_view as select group_concat(c1,',' order by c1 asc) from table_group_concat; select * from test_view; it will return an error like: "can not find c1 in table_list" Reason: When we executing this sql in multi-instance environment, Planner would try to create plan in multi phase aggregation. And because we analyze test_view independent with tables outside view. So we can not get table informations inside view. Solution: Substitute order by expression of merge aggregation expressions.
Proposed changes
Problem:
When executing group_concat with order by inside in view, column can not be found when analyze.
Example:
create view if not exists test_view as select group_concat(c1,',' order by c1 asc) from table_group_concat;
select * from test_view;
it will return an error like: "can not find c1 in table_list"
Reason:
When we executing this sql in multi-instance environment, Planner would try to create plan in multi phase
aggregation. And because we analyze test_view independent with tables outside view. So we can not get
table informations inside view.
Solution:
Substitute order by expression of merge aggregation expressions.
Further comments
If this is a relatively large or complex change, kick off the discussion at [email protected] by explaining why you chose the solution you did and what alternatives you considered, etc...