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



##########
File path: r/R/dataset-scan.R
##########
@@ -85,10 +85,22 @@ 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)) {
+      # TODO: should we check names and make sure we only project once per?
+      proj <- c(proj, projection)

Review comment:
       I don't think you want to `c()` because IIUC the projection should be 
applied after the existing projection. One possibility is that we special case 
for here and only accept a character vector here, so you'd end up doing:
   
   ```suggestion
         proj <- proj[projection]
   ```




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