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


##########
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:
   Update here -- this is still a significantly worse plan, however, as 
@neilconway  points out in 
https://github.com/apache/datafusion/pull/23871#issuecomment-5073629243 such a 
plan is likely not common (it produces a single group) so this is probably ok 
to change



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