sum12 commented on a change in pull request #1112:
URL: https://github.com/apache/arrow-rs/pull/1112#discussion_r777116128



##########
File path: arrow/src/csv/reader.rs
##########
@@ -696,6 +738,39 @@ impl Parser for Date64Type {
             _ => None,
         }
     }
+
+    fn parse_formatted(string: &str, format: &str) -> Option<i64> {
+        match Self::DATA_TYPE {
+            DataType::Date64 => {
+                use chrono::format::Fixed;
+                use chrono::format::StrftimeItems;
+                let fmt = StrftimeItems::new(format);
+                let has_zone = fmt.into_iter().any(|item| match item {

Review comment:
       I would love to avoid evaluation of `has_zone` on very call. Not sure if 
I can have some "attributes" on this particular implementation of 
Parser/Date64Type and avoid having to re-evaluate it everytime




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