jonkeane commented on a change in pull request #12357:
URL: https://github.com/apache/arrow/pull/12357#discussion_r808346731
##########
File path: r/R/dplyr-funcs-datetime.R
##########
@@ -147,5 +147,16 @@ register_bindings_datetime <- function() {
register_binding("pm", function(x) {
!call_binding("am", x)
})
+ register_binding("tz", function(x) {
+ if (!call_binding("is.POSIXct", x)) {
Review comment:
Oh, actually no — I'm totally wrong this is fine it's this that's the
problem:
```
if (inherits(x, "Expression")) {
class <- x$type()$ToString()
} else {
class <- type(x)
}
```
That should actually be:
```
if (inherits(x, "Expression")) {
class <- x$type()$ToString()
} else {
class <- type(x)$ToString()
}
```
and realistically, that should not even need an `if` there and could be
`type(x)$ToString()` if we added (or fixed) a `type` method for expressions (I
get `Error: Unrecognized vector instance for type ENVSXP` when I try
`type({Expression})`) But that doesn't have to happen here (though we should
make a Jira for it!
--
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]