You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/04/06 09:49:36 UTC

[GitHub] [arrow-datafusion] jackwener opened a new issue, #2169: Optimizer enhancement: convert outer join to inner join

jackwener opened a new issue, #2169:
URL: https://github.com/apache/arrow-datafusion/issues/2169

   **Is your feature request related to a problem or challenge? Please describe what you are trying to do.**
   
   ```sql
   table t1 | t2 (
   c1 float,
   c2 double,
   c3 boolean
   )
   
   ❯ explain select * from t1 left outer join t2 on t1.c1 = t2.c1 where t2.c3 = true;
   +---------------+-----------------------------------------------------------------------------------------------------------------------------------------+
   | plan_type     | plan                                                                                                                                    |
   +---------------+-----------------------------------------------------------------------------------------------------------------------------------------+
   | logical_plan  | Projection: #t1.c1, #t1.c2, #t1.c3, #t2.c1, #t2.c2, #t2.c3                                                                              |
   |               |   Filter: #t2.c3                                                                                                                        |
   |               |     Left Join: #t1.c1 = #t2.c1                                                                                                          |
   |               |       TableScan: t1 projection=Some([0, 1, 2])                                                                                          |
   |               |       TableScan: t2 projection=Some([0, 1, 2])                                                                                          |
   | physical_plan | ProjectionExec: expr=[c1@0 as c1, c2@1 as c2, c3@2 as c3, c1@3 as c1, c2@4 as c2, c3@5 as c3]                                           |
   |               |   CoalesceBatchesExec: target_batch_size=4096                                                                                           |
   |               |     FilterExec: c3@5                                                                                                                    |
   |               |       CoalesceBatchesExec: target_batch_size=4096                                                                                       |
   |               |         HashJoinExec: mode=Partitioned, join_type=Left, on=[(Column { name: "c1", index: 0 }, Column { name: "c1", index: 0 })]         |
   |               |           CoalesceBatchesExec: target_batch_size=4096                                                                                   |
   |               |             RepartitionExec: partitioning=Hash([Column { name: "c1", index: 0 }], 8)                                                    |
   |               |               RepartitionExec: partitioning=RoundRobinBatch(8)                                                                          |
   |               |                 CsvExec: files=[/home/jakevin/code/arrow-datafusion/datafusion/tests/aggregate_simple.csv], has_header=true, limit=None |
   |               |           CoalesceBatchesExec: target_batch_size=4096                                                                                   |
   |               |             RepartitionExec: partitioning=Hash([Column { name: "c1", index: 0 }], 8)                                                    |
   |               |               RepartitionExec: partitioning=RoundRobinBatch(8)                                                                          |
   |               |                 CsvExec: files=[/home/jakevin/code/arrow-datafusion/datafusion/tests/aggregate_simple.csv], has_header=true, limit=None |
   |               |                                                                                                                                         |
   +---------------+-----------------------------------------------------------------------------------------------------------------------------------------+
   ```
   
   **Describe the solution you'd like**
   Convert the outer join to inner join if we can. 
   
   **Describe alternatives you've considered**
   
   **Additional context**
   


-- 
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: github-unsubscribe@arrow.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow-datafusion] xudong963 commented on issue #2169: Optimizer enhancement: convert outer join to inner join

Posted by GitBox <gi...@apache.org>.
xudong963 commented on issue #2169:
URL: https://github.com/apache/arrow-datafusion/issues/2169#issuecomment-1090265165

   related: https://github.com/apache/arrow-datafusion/issues/1585


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow-datafusion] jackwener closed issue #2169: Optimizer enhancement: convert outer join to inner join

Posted by GitBox <gi...@apache.org>.
jackwener closed issue #2169: Optimizer enhancement: convert outer join to inner join
URL: https://github.com/apache/arrow-datafusion/issues/2169


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow-datafusion] jackwener commented on issue #2169: Optimizer enhancement: convert outer join to inner join

Posted by GitBox <gi...@apache.org>.
jackwener commented on issue #2169:
URL: https://github.com/apache/arrow-datafusion/issues/2169#issuecomment-1090324105

   Whoops -- this is a dupe of https://github.com/apache/arrow-datafusion/issues/1585


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow-datafusion] jackwener commented on issue #2169: Optimizer enhancement: convert outer join to inner join

Posted by GitBox <gi...@apache.org>.
jackwener commented on issue #2169:
URL: https://github.com/apache/arrow-datafusion/issues/2169#issuecomment-1090076124

   I am trying to do this and it will take a while.
   
   


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org