Abdi-29 commented on code in PR #5730:
URL: https://github.com/apache/arrow-rs/pull/5730#discussion_r1599857786


##########
arrow-cast/src/cast/string.rs:
##########
@@ -112,8 +112,11 @@ fn cast_string_to_timestamp_impl<O: OffsetSizeTrait, T: 
ArrowTimestampType, Tz:
             .map(|v| {
                 v.map(|v| {
                     let naive = string_to_datetime(tz, v)?.naive_utc();
-                    T::make_value(naive).ok_or_else(|| {
-                        ArrowError::CastError(format!(
+                    T::make_value(naive).ok_or_else(|| match T::UNIT {
+                        TimeUnit::Nanosecond => ArrowError::CastError(format!(

Review Comment:
   @alamb I did some research about the range of the other types but I couldn't 
find anything. Do you perhaps have some tips for me on where I can search for 
them?  



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