ianmcook commented on a change in pull request #9745:
URL: https://github.com/apache/arrow/pull/9745#discussion_r600118690



##########
File path: r/R/arrow-datum.R
##########
@@ -138,3 +138,16 @@ as.integer.ArrowDatum <- function(x, ...) 
as.integer(as.vector(x), ...)
 
 #' @export
 as.character.ArrowDatum <- function(x, ...) as.character(as.vector(x), ...)
+
+#' @export
+sort.ArrowDatum <- function(x, decreasing = FALSE, na.last = NA, ...) {
+  if (is.na(na.last)) {
+    x <- x$Filter(!is.na(x))
+    x$Take(x$SortIndices(descending = decreasing))
+  } else if (na.last) {
+    x$Take(x$SortIndices(descending = decreasing))
+  } else {
+    x <- Table$create(x = x, isnax = as.integer(is.na(x)))

Review comment:
       Done in 5eff4c6d90bd5b4cccf5078bd445fe0ef1ad6ff8




-- 
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.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to