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
Describe the bug
Currently the Logical Plan builder assumes that the join conditions fields are provided in the same order as the tables are specified. This is different behavior to how Postgres works which does not care about the order of the tables listed in the condition.
e.g.
t1_id = t2_id works as t1 is left and t1_id comes is on the left:
SELECT t1_id, t1_name, t2_name FROM t1 JOIN t2 ON t1_id = t2_id ORDER BY t1_id;
t2_id = t1_id does not work as t1 is left and t2_id comes from the right table:
SELECT t1_id, t1_name, t2_name FROM t1 JOIN t2 ON t2_id = t1_id ORDER BY t1_id;
To Reproduce
It is easy to reproduce with by changing the test with the first statement to the second statement.
Expected behavior
Postgres does not care which order the join condition fields are listed in as long as they can be uniquely identified.
Additional context
I have create a PR for this.
The text was updated successfully, but these errors were encountered:
Describe the bug
Currently the Logical Plan builder assumes that the join conditions fields are provided in the same order as the tables are specified. This is different behavior to how Postgres works which does not care about the order of the tables listed in the condition.
e.g.
t1_id = t2_id
works ast1
is left andt1_id
comes is on the left:t2_id = t1_id
does not work ast1
is left andt2_id
comes from the right table:To Reproduce
It is easy to reproduce with by changing the test with the first statement to the second statement.
Expected behavior
Postgres does not care which order the join condition fields are listed in as long as they can be uniquely identified.
Additional context
I have create a PR for this.
The text was updated successfully, but these errors were encountered: