-
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 arguments type changed to array type and implicitly cast child error #22947
Conversation
run buildall |
2 similar comments
run buildall |
run buildall |
(From new machine)TeamCity pipeline, clickbench performance test result: |
fb5eb78
to
5b2cdc4
Compare
run buildall |
(From new machine)TeamCity pipeline, clickbench performance test result: |
5b2cdc4
to
b4b6056
Compare
run buildall |
(From new machine)TeamCity pipeline, clickbench performance test result: |
run buildall |
(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. |
Proposed changes
Problem:
When querying sql with expression like count(case when...) Planner would return an implicitly cast error
Example:
select count(case true when true then null else null end) from t;
Reason:
When analyzing count function, it would expect return type of case when is a scalartype, if not, it would cast them into scalartype implicitly.
Solusion:
Open the switch of casting null to array, because this analyze happened before folding expression to constant
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...