paleolimbot commented on a change in pull request #12319:
URL: https://github.com/apache/arrow/pull/12319#discussion_r801592584
##########
File path: r/R/dplyr-funcs-type.R
##########
@@ -248,3 +249,33 @@ register_bindings_type_elementwise <- function() {
is_inf & !call_binding("is.na", is_inf)
})
}
+
+register_bindings_type_format <- function() {
+ register_binding("format", function(x, ...) {
+ if (inherits(x, "Expression") &&
Review comment:
We support it everywhere in one of two ways: we convert the R object to
an Expression (usually via scalar()) or evaluate in place.
``` r
library(arrow, warn.conflicts = FALSE)
library(dplyr, warn.conflicts = FALSE)
record_batch(a = "something") %>%
mutate(b = 2 + 2, c = format(Sys.Date()))
#> InMemoryDataset (query)
#> a: string
#> b: double (add_checked(2, 2))
#> c: string ("2022-02-08")
#>
#> See $.data for the source Arrow 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]