Skip to content

unexpected schema field name conflicts in joins #670

@jimexist

Description

@jimexist

Describe the bug
A clear and concise description of what the bug is.

with a join, we'd get false positive schema name collision

To Reproduce
Steps to reproduce the behavior:

this works:

SELECT
  t1.c9 x
FROM test t1
INNER JOIN test t2
ON t1.c9 = t2.c9
ORDER BY x;

but this won't:

SELECT
  t1.c9 x, t1.c1 c1
FROM test t1
INNER JOIN test t2
ON t1.c9 = t2.c9
ORDER BY x;
Plan("The left schema and the right schema have the following columns with the same name without being on the ON statement: {Column { name: \"c1\", index: 0 }}. Consider aliasing them.")

Expected behavior
A clear and concise description of what you expected to happen.

it shall work as expected (e.g. as in Postgres)

Additional context
Add any other context about the problem here.

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