nealrichardson commented on code in PR #13641:
URL: https://github.com/apache/arrow/pull/13641#discussion_r929898573
##########
r/R/dplyr.R:
##########
@@ -184,6 +184,29 @@ dim.arrow_dplyr_query <- function(x) {
c(rows, cols)
}
+#' @export
+unique.arrow_dplyr_query <- function(x, incomparables = FALSE, fromLast =
FALSE, ...) {
+
+ if (incomparables == TRUE) {
+ arrow_not_supported("`unique()` with `incomparables = TRUE`")
+ }
+
+ if (fromLast == TRUE) {
+ arrow_not_supported("`unique()` with `fromLast = TRUE`")
+ }
+
+ x <- dplyr::distinct(x)
+ dplyr::collect(x)
Review Comment:
I'm ok with always requiring an explicit collect(). That is the expectation
that has been set, that you do things to a Dataset and it doesn't evaluate
until you tell it to. I see the argument the other way too, but if we're going
to err on one side or the other, it should probably be on the conservative,
don't-run-a-big-query-until-I-say-so side.
--
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]