alamb commented on code in PR #18360:
URL: https://github.com/apache/datafusion/pull/18360#discussion_r2504036359


##########
datafusion/functions/src/datetime/date_trunc.rs:
##########
@@ -493,6 +515,21 @@ fn general_date_trunc_array_fine_granularity<T: 
ArrowTimestampType>(
     }
 }
 
+/// Applies the unary operation in place if possible, or cloning the array if 
not
+fn try_unary_mut_or_clone<F>(
+    array: PrimitiveArray<Int64Type>,
+    op: F,
+) -> Result<PrimitiveArray<Int64Type>>
+where
+    F: Fn(i64) -> Result<i64>,

Review Comment:
   - I filed https://github.com/apache/arrow-rs/issues/8808 to track this idea
   - 



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