-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Planner don't generate SubqueryAlias
#4483
Labels
bug
Something isn't working
Comments
Look like test explain verbose select * from ((select 1 as a, 2 as b) c INNER JOIN (select 1 as a, 3 as d) e on c.a = e.a) f;
+------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+
| plan_type | plan |
+------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+
| initial_logical_plan | Projection: c.a, c.b, e.a, e.d |
| | Inner Join: c.a = e.a |
| | SubqueryAlias: c |
| | Projection: Int64(1) AS a, Int64(2) AS b |
| | EmptyRelation |
| | SubqueryAlias: e |
| | Projection: Int64(1) AS a, Int64(3) AS d |
| | EmptyRelation |
I think this sql should be wrong, when we pg
select f.a from ((select 1 as a, 2 as b) c INNER JOIN (select 1 as a, 3 as d) e on c.a = e.a) f;
Help: db error: ERROR: column reference "a" is ambiguous sqlite
select * from ((select 1 as a, 2 as b) c INNER JOIN (select 1 as a, 3 as d) e on c.a = e.a) f;
ambiguous column name: a |
same problem with #4454 |
This was referenced Dec 2, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
To Reproduce
There isn't
subquery f
When we
select f.column1 from ((select column1 from t1) INNER JOIN (select column1 from t2) on t1.column1 = t2.column1) as f;
We can't find
f.column1
, just existt1.column1
.BTW, this plan is wrong.
Expected behavior
A clear and concise description of what you expected to happen.
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: