alamb commented on pull request #1566:
URL: 
https://github.com/apache/arrow-datafusion/pull/1566#issuecomment-1015733848


   > As a future follow up task, I think there is value in handling this plan 
rewrite in our optimizer layer so dataframe API users can benefit from it as 
well.
   
   @houqp  what do you have in mind? 
   
   With the `dataframe` API users can't create implicit joins the way you can 
with a sql query like `SELECT .. FROM foo, bar`;
   
   The only thing I can think of would be to extend `FilterPushdown` in a way 
that would try and push down `column = column` type expressions from `Filter` 
nodes into `Join` nodes? 
   
   So like
   
   ```
   Filter(a = b)
     Join (Cross)
       TableScan A
       TableScan B
   ```
   
   To 
   ```
     Join (Inner) exprs: {a = b}
       TableScan A
       TableScan B
   ```
   
   And 
   
   ```
   Filter(a = b)
     Join (Inner) exprs: {a2 = b2}
       TableScan A
       TableScan B
   ```
   
   ```
   Filter(a = b)
     Join (Inner) exprs: {a2 = b2 AND a = b}
       TableScan A
       TableScan B
   ```
   
   


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