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/03/25 07:09:49 UTC

[GitHub] [arrow-datafusion] Ted-Jiang opened a new issue #2088: Error occurs when optimize logical_plan after projection_push_down

Ted-Jiang opened a new issue #2088:
URL: https://github.com/apache/arrow-datafusion/issues/2088


   **Describe the bug**
   when i fix #2083 
   ```
   ❯ select 1 union all select 2;
   +-------------+
   | placeholder |
   +-------------+
   |             |
   | 1           |
   +-------------+
   2 rows in set. Query took 0.003 seconds.
   ❯ explain select 1 union all select 2;
   +---------------+-------------------------------------------------------+
   | plan_type     | plan                                                  |
   +---------------+-------------------------------------------------------+
   | logical_plan  | Union                                                 |
   |               |   Projection: Int64(1)                                |
   |               |     EmptyRelation                                     |
   |               |   EmptyRelation                                       |
   | physical_plan | UnionExec                                             |
   |               |   ProjectionExec: expr=[1 as Int64(1)]                |
   |               |     RepartitionExec: partitioning=RoundRobinBatch(16) |
   |               |       EmptyExec: produce_one_row=true                 |
   |               |   EmptyExec: produce_one_row=true                     |
   |               |                                                       |
   +---------------+-------------------------------------------------------+
   2 rows in set. Query took 0.003 seconds.
   ❯ explain verbose  select 1 union all select 2;
   +-------------------------------------------------------+-------------------------------------------------------+
   | plan_type                                             | plan                                                  |
   +-------------------------------------------------------+-------------------------------------------------------+
   | initial_logical_plan                                  | Union                                                 |
   |                                                       |   Projection: Int64(1)                                |
   |                                                       |     EmptyRelation                                     |
   |                                                       |   Projection: Int64(2)                                |
   |                                                       |     EmptyRelation                                     |
   | logical_plan after simplify_expressions               | SAME TEXT AS ABOVE                                    |
   | logical_plan after eliminate_filter                   | SAME TEXT AS ABOVE                                    |
   | logical_plan after common_sub_expression_eliminate    | SAME TEXT AS ABOVE                                    |
   | logical_plan after eliminate_limit                    | SAME TEXT AS ABOVE                                    |
   | logical_plan after projection_push_down               | Union                                                 |
   |                                                       |   Projection: Int64(1)                                |
   |                                                       |     EmptyRelation                                     |
   |                                                       |   EmptyRelation                                       |
   | logical_plan after filter_push_down                   | SAME TEXT AS ABOVE                                    |
   | logical_plan after limit_push_down                    | SAME TEXT AS ABOVE                                    |
   | logical_plan after SingleDistinctAggregationToGroupBy | SAME TEXT AS ABOVE                                    |
   | logical_plan after ToApproxPerc                       | SAME TEXT AS ABOVE                                    |
   | logical_plan after simplify_expressions               | SAME TEXT AS ABOVE                                    |
   | logical_plan after eliminate_filter                   | SAME TEXT AS ABOVE                                    |
   | logical_plan after common_sub_expression_eliminate    | SAME TEXT AS ABOVE                                    |
   | logical_plan after eliminate_limit                    | SAME TEXT AS ABOVE                                    |
   | logical_plan after projection_push_down               | SAME TEXT AS ABOVE                                    |
   | logical_plan after filter_push_down                   | SAME TEXT AS ABOVE                                    |
   | logical_plan after limit_push_down                    | SAME TEXT AS ABOVE                                    |
   | logical_plan after SingleDistinctAggregationToGroupBy | SAME TEXT AS ABOVE                                    |
   | logical_plan after ToApproxPerc                       | SAME TEXT AS ABOVE                                    |
   | logical_plan                                          | Union                                                 |
   |                                                       |   Projection: Int64(1)                                |
   |                                                       |     EmptyRelation                                     |
   |                                                       |   EmptyRelation                                       |
   | initial_physical_plan                                 | UnionExec                                             |
   |                                                       |   ProjectionExec: expr=[1 as Int64(1)]                |
   |                                                       |     EmptyExec: produce_one_row=true                   |
   |                                                       |   EmptyExec: produce_one_row=true                     |
   |                                                       |                                                       |
   | physical_plan after aggregate_statistics              | SAME TEXT AS ABOVE                                    |
   | physical_plan after hash_build_probe_order            | SAME TEXT AS ABOVE                                    |
   | physical_plan after coalesce_batches                  | SAME TEXT AS ABOVE                                    |
   | physical_plan after repartition                       | UnionExec                                             |
   |                                                       |   ProjectionExec: expr=[1 as Int64(1)]                |
   |                                                       |     RepartitionExec: partitioning=RoundRobinBatch(16) |
   |                                                       |       EmptyExec: produce_one_row=true                 |
   |                                                       |   EmptyExec: produce_one_row=true                     |
   |                                                       |                                                       |
   | physical_plan after add_merge_exec                    | SAME TEXT AS ABOVE                                    |
   | physical_plan                                         | UnionExec                                             |
   |                                                       |   ProjectionExec: expr=[1 as Int64(1)]                |
   |                                                       |     RepartitionExec: partitioning=RoundRobinBatch(16) |
   |                                                       |       EmptyExec: produce_one_row=true                 |
   |                                                       |   EmptyExec: produce_one_row=true                     |
   |                                                       |                                                       |
   +-------------------------------------------------------+-------------------------------------------------------+
   27 rows in set. Query took 0.014 seconds.
   
   ```
   
   **To Reproduce**
   Steps to reproduce the behavior:
   
   **Expected behavior**
   A clear and concise description of what you expected to happen.
   
   **Additional context**
   Add any other context about the problem here.
   


-- 
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 edited a comment on issue #2088: Error occurs when optimize logical_plan after projection_push_down

Posted by GitBox <gi...@apache.org>.
jackwener edited a comment on issue #2088:
URL: https://github.com/apache/arrow-datafusion/issues/2088#issuecomment-1078730293


   I'm interested in this issue. But I can't get key point of this issue accurately.
   
   In my opinion, It would be better to point those
   
   - specific problem points
   - possible reason
   - ...


-- 
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] Ted-Jiang closed issue #2088: Error occurs when optimize logical_plan after projection_push_down

Posted by GitBox <gi...@apache.org>.
Ted-Jiang closed issue #2088:
URL: https://github.com/apache/arrow-datafusion/issues/2088


   


-- 
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 edited a comment on issue #2088: Error occurs when optimize logical_plan after projection_push_down

Posted by GitBox <gi...@apache.org>.
jackwener edited a comment on issue #2088:
URL: https://github.com/apache/arrow-datafusion/issues/2088#issuecomment-1078730293


   I'm interested in this issue. But I can't get key point of this issue accurately. 
   
   In my opinion, It would be better to point those, Especially as it is also related to other issue
   
   - specific problem points
   - possible reason
   - ...


-- 
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 #2088: Error occurs when optimize logical_plan after projection_push_down

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


   I'm interested in this issue. But I can't get key point of this issue accurately.
   
   IMHO, It would be better point 
   
   - what is this problem
   - possible reason
   - ...


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