Dandandan commented on code in PR #11627:
URL: https://github.com/apache/datafusion/pull/11627#discussion_r1689368316
##########
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:
Can use filter kernel here instead of zipping?
--
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]