mhilton commented on code in PR #25849:
URL: https://github.com/apache/datafusion/pull/25849#discussion_r4131161987
##########
datafusion/functions-aggregate/src/count.rs:
##########
@@ -614,6 +651,19 @@ impl Accumulator for CountAccumulator {
Ok(())
}
+ fn update_batch_with_num_rows(
+ &mut self,
+ values: &[ArrayRef],
+ num_rows: usize,
+ ) -> Result<()> {
+ if values.is_empty() {
+ self.count += num_rows as i64;
+ Ok(())
+ } else {
+ self.update_batch(values)
+ }
+ }
+
fn retract_batch(&mut self, values: &[ArrayRef]) -> Result<()> {
Review Comment:
It looks like this will be broken if it was ever used with the zero-column
version.
--
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]