jorgecarleitao commented on a change in pull request #8485:
URL: https://github.com/apache/arrow/pull/8485#discussion_r507070561
##########
File path: rust/arrow/src/array/array.rs
##########
@@ -502,6 +502,98 @@ impl<T: ArrowNumericType> PrimitiveArray<T> {
}
}
+fn as_datetime<T: ArrowPrimitiveType>(v: i64) -> Option<NaiveDateTime> {
Review comment:
This places these functions outside the `impl`, so that we can use them:
When used with `ArrowNumericType`, it can convert itself to i64 and thus
this is simple.
When we use it with `PrimitiveType`, we use `to_usize` to convert to i64.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]