We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Describe the bug For some join sql whose meaning is not clear, datafusion will not throw error. For example, test0 and test1 both has c0 column.
test0
test1
c0
❯ explain select * from test0 as t0 inner join test0 as t1 on c0 = c0; +---------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | plan_type | plan | +---------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | logical_plan | Projection: t0.c0, t0.c1, t0.c2, t0.c3, t0.c4, t0.c5, t1.c0, t1.c1, t1.c2, t1.c3, t1.c4, t1.c5 | | | Inner Join: t0.c0 = t1.c0 | | | SubqueryAlias: t0 | | | TableScan: test0 projection=[c0, c1, c2, c3, c4, c5] | | | SubqueryAlias: t1 | | | TableScan: test0 projection=[c0, c1, c2, c3, c4, c5] |
In PostgreSQL, this will throw an error:
psql -d "$POSTGRES_DB" -h "$POSTGRES_HOST" -p "$POSTGRES_PORT" -U "$POSTGRES_USER" -c "explain select * from test0 as t0 inner join test0 as t1 on c0 = c0;" ERROR: column reference "c0" is ambiguous LINE 1: ...select * from test0 as t0 inner join test0 as t1 on c0 = c0; ^
The semantics of this sql is not clear, we need throw exception like PostgreSQL do.
To Reproduce test0 and test1 both has c0 column.
Then run explain select * from test0 as t0 inner join test0 as t1 on c0 = c0;.
explain select * from test0 as t0 inner join test0 as t1 on c0 = c0;
Expected behavior
Additional context
The text was updated successfully, but these errors were encountered:
It is a bug, we should fix it.
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
Describe the bug
For some join sql whose meaning is not clear, datafusion will not throw error.
For example,
test0
andtest1
both hasc0
column.In PostgreSQL, this will throw an error:
The semantics of this sql is not clear, we need throw exception like PostgreSQL do.
To Reproduce
test0
andtest1
both hasc0
column.Then run
explain select * from test0 as t0 inner join test0 as t1 on c0 = c0;
.Expected behavior
Additional context
The text was updated successfully, but these errors were encountered: