alamb commented on code in PR #22132:
URL: https://github.com/apache/datafusion/pull/22132#discussion_r3306250355


##########
datafusion/sqllogictest/test_files/optimizer_group_by_constant.slt:
##########
@@ -60,10 +60,9 @@ FROM test_table t
 group by 1, 2, 3
 ----
 logical_plan
-01)Projection: Int64(123), Int64(456), Int64(789), count(Int64(1)), avg(t.c12)
-02)--Aggregate: groupBy=[[]], aggr=[[count(Int64(1)), avg(t.c12)]]
-03)----SubqueryAlias: t
-04)------TableScan: test_table projection=[c12]
+01)Aggregate: groupBy=[[Int64(123), Int64(456), Int64(789)]], 
aggr=[[count(Int64(1)), avg(t.c12)]]

Review Comment:
   isn't this a significantly worse plan? it now must compute the grouping 
columns for *each* input row (even though they are constants)



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to