Dandandan commented on pull request #1402:
URL: https://github.com/apache/arrow-datafusion/pull/1402#issuecomment-987674516


   > > This usage becomes harder when we choose to not respect the SQL syntax 
and instead encode a right join as a left join even if the user carefully 
picked the smaller left side in his query?
   > 
   > If I read the source code rightly, we'll optimize the smaller side in a 
join as the left side during the physical plan phrase (even if the user doesn't 
do it in SQL)? 
   > 
   > So I think we should reserve `Right Join` in `Join Type`, and then it'll 
be used during the physical plan phrase. In addition, our dataframe API  users 
also need the `Right Join` in `Join Type`.
   > 
   > I think this ticket will **only** facilitate logic optimization,  with one 
less processing case, and our code logic will also be simplified.
   
   That's true - but a user can also disable that specific optimization in the 
configuration if he wants to make sure the order is preserved. After all, the 
reordering is/might be based on heuristics instead of complete knowledge about 
the biggest / smallest side.


-- 
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]


Reply via email to