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



##########
File path: r/R/dplyr-funcs-datetime.R
##########
@@ -147,5 +147,15 @@ register_bindings_datetime <- function() {
   register_binding("pm", function(x) {
     !call_binding("am", x)
   })
-
+  register_binding("tz", function(x) {
+    if (call_binding("is.Date", x)) {
+      abort("timezone extraction for objects of class `date` not supported in 
Arrow")
+    } else if (call_binding("is.numeric", x)) {
+      abort("timezone extraction for objects of class `numeric` not supported 
in Arrow")
+    } else if (call_binding("is.character", x)) {
+      abort("timezone extraction for objects of class `character` not 
supported in Arrow")
+    } else {
+      return(x$type()$timezone())
+    }

Review comment:
       Done. 




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