You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2020/10/18 09:58:34 UTC

[GitHub] [arrow] jorgecarleitao commented on a change in pull request #8485: ARROW-10002: [Rust] Remove trait specialization

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:
users@infra.apache.org