Skip to content

Excessive substitution of aliases #9715

@alexey-milovidov

Description

@alexey-milovidov

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

  1. If aliased expression contains aggregate function, alias should not be resolved inside another aggregate function.
  2. If alias name clashes with the column name, the substitution of this alias should be cancelled.

Metadata

Metadata

Assignees

No one assigned

    Labels

    featurest-discussionWhen the implementation aspects are not clear or when the PR is on hold due to questions.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions