rok commented on a change in pull request #11105:
URL: https://github.com/apache/arrow/pull/11105#discussion_r710943829
##########
File path: r/R/dplyr-functions.R
##########
@@ -672,6 +672,16 @@ nse_funcs$strptime <- function(x, format = "%Y-%m-%d
%H:%M:%S", tz = NULL, unit
Expression$create("strptime", x, options = list(format = format, unit =
unit))
}
+nse_funcs$strftime <- function(x, format = "", tz = "", usetz = FALSE) {
+ if (tz != "") {
+ arrow_not_supported("tz argument")
Review comment:
The way `strftime` kernel is currently implemented in arrow is that the
timezone is taken from metadata of the timestamp array. (There is a
[jira](https://issues.apache.org/jira/browse/ARROW-13247) for a timezone
changing kernel.)
I think this is consistent with most `strftime` implementations (e.g.
[pandas](https://pandas.pydata.org/docs/reference/api/pandas.Series.dt.strftime.html))
but obviously not this one.
I'd prefer to either do casting of the timestamp here (I'm not sure it's
technically possible. @nic - do you know if it is?) or error out.
Another option is of course to alter the c++ `strftime`, I'd then make a
jira and we can discuss it there.
--
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]