-
Notifications
You must be signed in to change notification settings - Fork 11
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
🪲 Name clashes in JOINs result in files not being found #471
Comments
may be related to this failing: SELECT P.* FROM (SELECT * FROM $planets) AS P |
Nope - second example now working but first example still not working. |
This works SELECT P0.id
FROM $planets AS P0 but when this fails it complains about the SELECT P0.id, P1.ID
FROM $planets AS P0
INNER JOIN (SELECT id AS ID FROM $planets) AS P1 ON P0.name = P1.name This should fail because the SELECT P0.id, P1.ID
FROM $planets AS P0
INNER JOIN (SELECT id AS ID FROM $planets) AS P1 USING (name) But this one works: SELECT P0.id, P1.ID
FROM $planets AS P0
INNER JOIN (SELECT name, id AS ID FROM $planets) AS P1 USING (name) but this one complains about SELECT P0.id, P1.ID
FROM $planets AS P0
INNER JOIN (SELECT id, name AS ID FROM $planets) AS P1 ON P0.name = P1.name |
That query is illogical, it should have been: SELECT P0.id, P1.ID
FROM $planets AS P0
INNER JOIN (SELECT id, name AS ID FROM $planets) AS P1 ON P0.name = P1.name The problem is with P1, not P0 even though it's P0 in the error. It looked for the value in P1 (where it is), failed, then looked in P0, where it isn't. but even though it was aliased, P1.name should have been found, the issue appears to be with the column alias at the same time as the relation alias. |
Describe the bug
A clear and concise description of what the bug is.
SQL statement
Please submit the SQL statement, or a representative example using the sample datasets.
Expected behaviour
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: