You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/04/29 13:35:21 UTC

[GitHub] [arrow] dragosmg commented on a diff in pull request #12589: ARROW-14848: [R] Implement bindings for lubridate's parse_date_time, parse_date_time2, and fast_strptime

dragosmg commented on code in PR #12589:
URL: https://github.com/apache/arrow/pull/12589#discussion_r861809788


##########
r/R/dplyr-funcs-datetime.R:
##########
@@ -357,6 +357,62 @@ register_bindings_duration <- function() {
     delta <- delta$cast(int64())
     start + delta$cast(duration("s"))
   })
+  register_binding("fast_strptime", function(x,
+                                             format,
+                                             tz = "UTC",
+                                             lt = TRUE,
+                                             cutoff_2000 = 68L,
+                                             unit = "s") {
+    # TODO support multiple formats once
+    # https://issues.apache.org/jira/browse/ARROW-15665 is done
+    if (length(format) > 1) {
+      arrow_not_supported("multiple values for `format`")
+    }
+
+    if (!missing(tz)) {
+      arrow_not_supported("Time zone argument")
+    }

Review Comment:
   I think this is a situation where the `strptime` binding does not support `tz` and `fast_strptime` builds a `strptime` expression. `strptime` has a comment pointing to [ARROW-12820](https://issues.apache.org/jira/browse/ARROW-12820) - which I see has been addressed. I created [ARROW-16415](https://issues.apache.org/jira/browse/ARROW-16415) to update both definitions.



-- 
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-unsubscribe@arrow.apache.org

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