-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Excessive substitution of aliases #9715
Copy link
Copy link
Open
Labels
featurest-discussionWhen the implementation aspects are not clear or when the PR is on hold due to questions.When the implementation aspects are not clear or when the PR is on hold due to questions.
Description
Use case
SELECT avg(number) AS number, max(number) FROM numbers(10)
Aggregate function avg(number) is found inside another aggregate function in query.
Possible solutions
- If aliased expression contains aggregate function, alias should not be resolved inside another aggregate function.
- If alias name clashes with the column name, the substitution of this alias should be cancelled.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
featurest-discussionWhen the implementation aspects are not clear or when the PR is on hold due to questions.When the implementation aspects are not clear or when the PR is on hold due to questions.