miguelcorderopamphile commented on code in PR #11572:
URL: https://github.com/apache/arrow-rs/pull/11572#discussion_r4304605684


##########
arrow-cast/src/cast/mod.rs:
##########
@@ -5526,6 +5563,44 @@ mod tests {
         );
     }
 
+    #[test]
+    fn test_cast_string_to_duration() {
+        let array = StringArray::from(vec![Some("1"), Some("-2"), None, 
Some("invalid")]);

Review Comment:
   Done in ffa5e929f — non-integer strings now fall back to the interval 
parser, so "1 hour 10 minutes" casts to any Duration unit. Integer strings 
behave as before.
   
   Months/days stay non-convertible to match the interval → duration cast (null 
when safe, error otherwise). I can change that if you'd rather treat "1 day" as 
24h.



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