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 05:23:52 UTC

[GitHub] [arrow-datafusion] jackwener edited a comment on issue #2045: `SingleDistinctAggregationToGroupBy` rule cause some strange change

jackwener edited a comment on issue #2045:
URL: https://github.com/apache/arrow-datafusion/issues/2045#issuecomment-1076018593


   Now the target is rewrite from
   
   ```sql
   | initial_logical_plan | Projection: #Max(DISTINCT test.c1)                     
   |                      |   Aggregate: groupBy=[[]], aggr=[[Max(DISTINCT #test.c1)]]                      
   |                      |     TableScan: test projection=None
   ```
   to
   ```sql
   | initial_logical_plan | Projection: #Max(DISTINCT test.c1)
   |                      |   Projection: #Max(#test.c1) AS Max(DISTINCT test.c1)                   
   |                      |     Aggregate: groupBy=[[]], aggr=[[Max(#test.c1)]]                
   |                      |       TableScan: test projection=None
   ```
   instead of 
   
   ```sql
   | logical_plan  | Projection: #Max(DISTINCT test.c1)          
   |               |   Projection: #Max(alias1) AS Max(DISTINCT test.c1)     
   |               |     Aggregate: groupBy=[[]], aggr=[[Max(#alias1)]]        
   |               |       Aggregate: groupBy=[[#test.c1 AS alias1]], aggr=[[]]                        
   |               |       Aggregate: groupBy=[[#test.c1 AS alias1]], aggr=[[]]  
   |               |         TableScan: test projection=Some([0])
   ```


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