You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> SELECT * FROM server NATURAL JOIN client AS client ORDER BY server.id;
Schema error: No field named server.id. Valid fields are client.id, client.name, client.stuff.
This is actually correct per SQL spec. NATURAL JOIN is a shorthand for USING and when using USING, the join condition columns are deduplicated and lose original qualification.
In DataFusion dialect of SQL we probably want to support this though, because PostgreSQL supports it
postgres=# create table client(id int, name varchar, stuff int);
CREATE TABLE
postgres=# create table server(id int, name varchar, stuff int);
CREATE TABLE
postgres=# SELECT * FROM server NATURAL JOIN client AS client ORDER BY server.id;
id | name | stuff
----+------+-------
(0 rows)
... while still deduplicating columns on the output (id and other join columns appear only once)
Describe the bug
Bug where NATURAL JOIN rejects source table column qualifiers in ORDER BY clause.
To Reproduce
Expected behavior
Additional context
No response
The text was updated successfully, but these errors were encountered: