2010YOUY01 commented on PR #25783: URL: https://github.com/apache/datafusion/pull/25783#issuecomment-5851160432
To ensure I understand it correctly: the downstream optimizer rewrite aggregate to no group and aggregate, since the consumer only have to know if this aggregate has empty output set. In this case, I think it's better to let AggregateExec to be more conservative and error, and fix comet optimizer instead, since this is not a expected input for `AggregateExec` The end query is not failing in datafusion, I guess it's handling the special case in optimizer for the same reason: ``` -- datafusion-cli 54.1.0 > SELECT 1 FROM (SELECT count(*) FROM VALUES (1) AS v(a)); +----------+ | Int64(1) | +----------+ | 1 | +----------+ 1 row(s) fetched. Elapsed 0.035 seconds. ``` -- 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]
