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


##########
arrow-cast/src/parse.rs:
##########
@@ -1503,6 +1509,11 @@ mod tests {
             "2020-09-08-03",
             "2020--04-03",
             "2020--",
+            "2020-09-08 01",
+            "2020-09-08 01:02",
+            "2020-09-08 01-02-03",
+            "2020-9-8 01:02:03",
+            "2020-09-08 1:2:3",

Review Comment:
   Something like this could be used to be more flexible with the date(time) 
support format, while also adhering to some form of input validation:
   ```rust
   fn parse_date(string: &str) -> Option<NaiveDate> {
       if string.len() > 10 {
           let mut parts = string.splitn(2, ' ');
           return match (parts.next(), parts.next()) {
               (Some(date), Some(time)) if string_to_time(time).is_some() => 
parse_date(date),
               _ => None,
           };
       };
   ```



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