dragosmg commented on code in PR #13055: URL: https://github.com/apache/arrow/pull/13055#discussion_r868384571
########## r/R/dplyr-funcs-datetime.R: ########## @@ -412,9 +412,10 @@ register_bindings_duration <- function() { if (call_binding("is.character", x)) { x <- build_expr("strptime", x, options = list(format = format, unit = 0L)) - # complex casting only due to cast type restrictions: time64 -> int64 -> duration(us) + # complex casting due to cast type restrictions: time64 -> int64 -> duration(us) # and then we cast to duration ("s") at the end - x <- x$cast(time64("us"))$cast(int64())$cast(duration("us")) + # we also need the casting chain to get the measurement units right + x <- make_duration(x$cast(time64("us")), unit = "us") 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: github-unsubscr...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org