korowa commented on code in PR #11627: URL: https://github.com/apache/datafusion/pull/11627#discussion_r1695652943
########## datafusion/physical-expr-common/src/aggregate/groups_accumulator/prim_op.rs: ########## @@ -134,6 +134,46 @@ where self.update_batch(values, group_indices, opt_filter, total_num_groups) } + fn convert_to_state( + &self, + values: &[ArrayRef], + opt_filter: Option<&BooleanArray>, + ) -> Result<Vec<ArrayRef>> { + let values = values[0].as_primitive::<T>(); + let mut state = PrimitiveBuilder::<T>::with_capacity(values.len()) + .with_data_type(self.data_type.clone()); + + match opt_filter { + Some(filter) => { + values Review Comment: For "no filter" -- casting `values.logical_nulls()` to i64 helps a bit. Regarding `bitwise_and` -- I'll try (the problem with all logical functions is that `filter` may also contain nulls) -- 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: github-unsubscr...@datafusion.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For additional commands, e-mail: github-h...@datafusion.apache.org