findepi commented on code in PR #17139:
URL: https://github.com/apache/datafusion/pull/17139#discussion_r2270199837
##########
datafusion/optimizer/src/optimize_projections/mod.rs:
##########
@@ -1146,9 +1139,7 @@ mod tests {
plan,
@r"
Aggregate: groupBy=[[]], aggr=[[count(Int32(1))]]
- Projection:
- Aggregate: groupBy=[[]], aggr=[[count(Int32(1))]]
- TableScan: ?table? projection=[]
+ EmptyRelation
Review Comment:
table scan gets replaced with 1-row VALUES (that would be more visible if we
merge https://github.com/apache/datafusion/pull/17145)
we could further eliminate `count(*)` on top of a relation with known
cardinality. follow-up potential
--
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]