jonkeane commented on code in PR #12738:
URL: https://github.com/apache/arrow/pull/12738#discussion_r854424643
##########
r/R/dplyr-funcs-datetime.R:
##########
@@ -463,3 +463,54 @@ duration_from_chunks <- function(chunks) {
}
duration
}
+
+binding_as_date <- function(x,
+ format = NULL,
+ tryFormats = "%Y-%m-%d",
+ origin = "1970-01-01",
+ use_tz = "UTC",
+ base = TRUE) {
Review Comment:
Sorry if I was unclear on this: I meant that we should rename `base` to
`use_tz` and keep `tz` like it is. Though even still, like I said the first
time: I suspect we don't actually need this `base` argument at all, and instead
we can alter `x` to include the TZ before calling `binding_as_date` and then
not carry around this extra argument:
basically, you make the `as.Date` binding be:
```
if (call_binding("is.POSIXct", x)) {
x <- build_expr("cast", x, options = cast_options(to_type =
timestamp(timezone = tz)))
}
binding_as_date(x, ...)
```
But if the argument is necessary, let's call it something that is explicit
about what it does.
--
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]