Skip to content
New issue

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

A join SQL query with ambiguous table reference executes without error (SQLancer-NoREC) #12337

Closed
2010YOUY01 opened this issue Sep 5, 2024 · 0 comments · Fixed by #12467
Closed
Labels
bug Something isn't working

Comments

@2010YOUY01
Copy link
Contributor

2010YOUY01 commented Sep 5, 2024

Describe the bug

The t1.v1 inside query's on clause is ambiguous, it's not clear which t1 it's referring to, such query should be rejected by the planner

See reproducer in datafusion-cli (Compilred from latest main with cargo run, commit hash d6f3f73)

DataFusion CLI v41.0.0
> create table t1(v1 int);

0 row(s) fetched.
Elapsed 0.070 seconds.

> select count(*)
from t1
right outer join t1
on t1.v1 > 0;
+----------+
| count(*) |
+----------+
| 0        |
+----------+
1 row(s) fetched.
Elapsed 0.075 seconds.

To Reproduce

No response

Expected behavior

No response

Additional context

Found by SQLancer #11030

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant