nealrichardson commented on a change in pull request #11133:
URL: https://github.com/apache/arrow/pull/11133#discussion_r706460650
##########
File path: r/R/dplyr-functions.R
##########
@@ -694,6 +694,10 @@ nse_funcs$wday <- function(x, label = FALSE, abbr = TRUE,
week_start = getOption
}
nse_funcs$log <- nse_funcs$logb <- function(x, base = exp(1)) {
+ if (inherits(base, "Expression")) {
+ return(Expression$create("logb_checked", x, base))
+ }
+
Review comment:
inherits() is fine, we just need the check after it. You're right that
length > 1 works in R but it won't here because we don't know the correct
length that the supplied vector should be at this point, and more importantly,
row order in Arrow queries isn't deterministic.
--
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]