eitsupi commented on code in PR #13890:
URL: https://github.com/apache/arrow/pull/13890#discussion_r996222127


##########
r/R/dplyr-funcs-datetime.R:
##########
@@ -326,7 +326,7 @@ register_bindings_datetime_conversion <- function() {
     # => we only cast when we want the behaviour of the base version or when
     # `tz` is set (i.e. not NULL)
     if (call_binding("is.POSIXct", x)) {
-      x <- build_expr("cast", x, options = cast_options(to_type = 
timestamp(timezone = tz)))
+      x <- build_expr("cast", x, options = cast_options(to_type = 
timestamp(x$type()$unit(), timezone = tz)))

Review Comment:
   It seems that `"ns"` needs to be hard-coded as `x$tyep()$unit()` would not 
be exist if x was an R object.



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