Skip to content

the select clause after union all has many same name columns needn't use different aliases #10244

@l1t1

Description

@l1t1

Is your feature request related to a problem or challenge?

now it reports an error

> select 1 a,2 b union all select null,null;
Error during planning: Projections require unique expression names but the expression "NULL" at position 0 and "NULL" at position 1 have the same name. Consider aliasing ("AS") one of them.
> select 1 a,2 b union all select 2,2;
Error during planning: Projections require unique expression names but the expression "Int64(2)" at position 0 and "Int64(2)" at position 1 have the same name. Consider aliasing ("AS") one of them.

Describe the solution you'd like

It runs as normal
the result of above query equals to select 1 a,2 b union all select null,null c and select 1 a,2 b union all select 2,2 c

Describe alternatives you've considered

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions