jonmmease commented on PR #22998:
URL: https://github.com/apache/datafusion/pull/22998#issuecomment-6081859708

   Just a note that this fixes a case I ran into with `SELECT *` over a `LEFT 
JOIN ... USING` when the table aliases sort alphabetically in opposite order of 
the join.
   
   ```sql
   CREATE TABLE l(k INT, a VARCHAR) AS VALUES (1, 'l1'), (2, 'l2');
   CREATE TABLE r(k INT, b VARCHAR) AS VALUES (2, 'r2'), (3, 'r3');
   
   SELECT * FROM l AS z LEFT JOIN r AS a USING (k) ORDER BY a;
   -- a  | k    | b
   -- ---+------+-----
   -- l1 | NULL | NULL   <- k should be 1
   -- l2 | 2    | r2
   ```
   
   This case behaves correctly on this branch.
   
   Thanks for the fix @Phoenix500526 and reviews @neilconway and @nathanb9


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to