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/01 11:25:14 UTC

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

dragosmg commented on a change in pull request #12589:
URL: https://github.com/apache/arrow/pull/12589#discussion_r822916289



##########
File path: r/R/dplyr-funcs-datetime.R
##########
@@ -167,4 +167,33 @@ register_bindings_datetime <- function() {
   register_binding("date", function(x) {
     build_expr("cast", x, options = list(to_type = date32()))
   })
+  register_binding("fast_strptime", function(x,
+                                             format,
+                                             tz = "UTC",
+                                             lt = TRUE,
+                                             cutoff_2000 = 68L,
+                                             unit = "s") {
+    if (!missing(tz)) {
+      arrow_not_supported("Time zone argument")
+    }
+    # `lt` controls the output `lt = TRUE` returns a POSIXlt (which doesn't play
+    # well with mutate, for example)
+    if (lt) {
+      arrow_not_supported("`lt = TRUE` argument")
+    }
+
+    if (cutoff_2000 != 68L) {
+      arrow_not_supported("`cutoff_2000` != 68L argument")
+    }
+
+    # the strptime kernel does not support scalar strings => if we want to be

Review comment:
       I was getting an error message indicating just that. Now I cannot reproduce it 🤦🏻‍♂️ . I removed the additional logic.  Good catch




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