gruuya commented on code in PR #3752:
URL: https://github.com/apache/arrow-rs/pull/3752#discussion_r1115765616


##########
arrow-cast/src/cast.rs:
##########
@@ -2562,26 +2573,35 @@ fn cast_string_to_timestamp_ns<Offset: OffsetSizeTrait>(
         .downcast_ref::<GenericStringArray<Offset>>()
         .unwrap();
 
+    let scale_factor = match TimestampType::get_time_unit() {
+        TimeUnit::Microsecond => 1_000,
+        TimeUnit::Nanosecond => 1,
+        _ => return Err(ArrowError::CastError("String to timestamp casting 
supports only microsecond or nanosecond resolution".to_string()))

Review Comment:
   Not to my knowledge; I can add them too if no one objects.



-- 
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: github-unsubscr...@arrow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to