ametel01 commented on code in PR #23038:
URL: https://github.com/apache/datafusion/pull/23038#discussion_r3487101442
##########
datafusion/physical-expr/src/aggregate.rs:
##########
@@ -275,6 +273,12 @@ impl AggregateExprBuilder {
.map(|arg| arg.return_field(&schema))
.collect::<Result<Vec<_>>>()?;
+ if args.is_empty() && fun.name() == "count" {
+ return plan_err!(
+ "Physical count aggregate requires an argument; use
COUNT_STAR_EXPANSION for count(*)"
+ );
+ }
Review Comment:
Thanks, that makes sense.
I’ll update the physical count guard to use `assert_or_internal_err!` and
remove the extra test.
--
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]