nealrichardson commented on a change in pull request #10888:
URL: https://github.com/apache/arrow/pull/10888#discussion_r699317536



##########
File path: r/R/dataset-scan.R
##########
@@ -85,9 +85,28 @@ Scanner$create <- function(dataset,
       # To handle mutate() on Table/RecordBatch, we need to 
collect(as_data_frame=FALSE) now
       dataset <- dplyr::collect(dataset, as_data_frame = FALSE)
     }
+
+    proj <- c(dataset$selected_columns, dataset$temp_columns)
+
+    if (!is.null(projection)) {
+      if (is.character(projection)) {
+        proj <- proj[projection]
+      } else {
+        # TODO: ARROW-13802 accepting lists of Expressions as a projectoin

Review comment:
       ```suggestion
           # TODO: ARROW-13802 accepting lists of Expressions as a projection
   ```

##########
File path: r/R/dataset-scan.R
##########
@@ -28,7 +28,7 @@
 #'
 #' * `dataset`: A `Dataset` or `arrow_dplyr_query` object, as returned by the
 #'    `dplyr` methods on `Dataset`.
-#' * `projection`: A character vector of column names to select
+#' * `projection`: A character vector of column names to select columns

Review comment:
       As it turns out, `projection` can be a named list of Expressions, just 
not when dataset is an arrow_dplyr_query (and thus already contains a named 
list of Expressions)




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


Reply via email to