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-unsubscr...@arrow.apache.org

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


Reply via email to