sum12 commented on issue #587:
URL: https://github.com/apache/arrow-rs/issues/587#issuecomment-892638678


   Hello, Thanks for the awesome description. 
   I spent sometime reading through the code base to implement this cast.
   
   - one way to would be have a helper `cast_timestamp_to_string` helper which 
iterates over each of elements and calls `array_value_to_string`  and `collect` 
result and `into` it into `GenericStringArray`
   
   - or one could replicate what `as_datetime` does in the cast.rs but limit it 
to `Timestamp(_,_)` type 
   
   - or one could just cast the array into a `PrimitiveArray` and call 
`value_as_time` and `push` into a `Vec<String>` and `into` a 
`GenericStringArray` (This seem to be the simplest approch but I am not sure 
how to bound it to `ArrowTimestampType` only since `value_as_datetime` expect 
to satisfy `ArrowNumericType` also)   
   
   I tried 2 and 3 but still wasnt sure. 


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


Reply via email to