timsaucer commented on code in PR #20449:
URL: https://github.com/apache/datafusion/pull/20449#discussion_r2847824214


##########
datafusion/functions-aggregate-common/src/aggregate/groups_accumulator/bool_op.rs:
##########
@@ -37,7 +37,7 @@ use super::accumulate::NullState;
 #[derive(Debug)]
 pub struct BooleanGroupsAccumulator<F>
 where
-    F: Fn(bool, bool) -> bool + Send + Sync,
+    F: Fn(bool, bool) -> bool + Send + Sync + 'static,

Review Comment:
   This change, along with the similar updates in this and other files, is the 
only thing that I think will be controversial in this PR.



##########
datafusion/spark/src/function/aggregate/avg.rs:
##########
@@ -213,7 +213,7 @@ impl Accumulator for AvgAccumulator {
 struct AvgGroupsAccumulator<T, F>
 where
     T: ArrowNumericType + Send,
-    F: Fn(T::Native, i64) -> Result<T::Native> + Send,
+    F: Fn(T::Native, i64) -> Result<T::Native> + Send + 'static,

Review Comment:
   This change, along with the similar updates in this and other files, is the 
only thing that I think will be controversial in this PR.



##########
datafusion/functions-aggregate/src/average.rs:
##########
@@ -754,7 +754,7 @@ impl Accumulator for DurationAvgAccumulator {
 struct AvgGroupsAccumulator<T, F>
 where
     T: ArrowNumericType + Send,
-    F: Fn(T::Native, u64) -> Result<T::Native> + Send,
+    F: Fn(T::Native, u64) -> Result<T::Native> + Send + 'static,

Review Comment:
   This change, along with the similar updates in this and other files, is the 
only thing that I think will be controversial in this PR.



##########
datafusion/functions-aggregate-common/src/aggregate/groups_accumulator/prim_op.rs:
##########
@@ -41,7 +41,7 @@ use super::accumulate::NullState;
 pub struct PrimitiveGroupsAccumulator<T, F>
 where
     T: ArrowPrimitiveType + Send,
-    F: Fn(&mut T::Native, T::Native) + Send + Sync,
+    F: Fn(&mut T::Native, T::Native) + Send + Sync + 'static,

Review Comment:
   This change, along with the similar updates in this and other files, is the 
only thing that I think will be controversial in this PR.



-- 
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]

Reply via email to