alamb commented on code in PR #3101:
URL: https://github.com/apache/arrow-rs/pull/3101#discussion_r1022037497


##########
arrow-cast/src/parse.rs:
##########
@@ -199,10 +199,123 @@ impl Parser for TimestampSecondType {
     }
 }
 
-parser_primitive!(Time64NanosecondType);
-parser_primitive!(Time64MicrosecondType);
-parser_primitive!(Time32MillisecondType);
-parser_primitive!(Time32SecondType);
+impl Parser for Time64NanosecondType {
+    fn parse(string: &str) -> Option<Self::Native> {

Review Comment:
   I think accepting a wide range of formats is consistent with 
`string_to_timestamp_nanos` for better or worse
   
   
https://github.com/Jefffrey/arrow-rs/blob/3ca41f50d0e8b6da95d83e5bf0b09fd518e2110f/arrow-cast/src/parse.rs#L71-L133
   
   The only thing I recommend is adding docstring documentation (that will show 
up on docs.rs) for the types of formats accepted. We could follow the example 
of string_to_timestamp_nanos :
   
https://github.com/Jefffrey/arrow-rs/blob/3ca41f50d0e8b6da95d83e5bf0b09fd518e2110f/arrow-cast/src/parse.rs#L23-L54



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