Skip to content

Projections require unique expression names error #9130

Description

@lewiszlw

Describe the bug

Datafusion failed to execute select * from (t1 cross join t2) as t cross join t3 with error message

Error during planning: Projections require unique expression names but the expression "t.a" at position 0 and "t.a" at position 2 have the same name. Consider aliasing ("AS") one of them.

I tested on sqlite3 and it return expected result.
latest commit: 840499f

To Reproduce

create table t1 (a int, b int);
create table t2 (a int, b int);
create table t3 (a int, b int);
insert into t1 values (1, 2);
insert into t2 values (3, 4);
insert into t3 values (5, 6);
select * from (t1 cross join t2) as t cross join t3;

Expected behavior

Return result like sqlite3

1|2|3|4|5|6

Additional context

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions