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



##########
File path: r/R/dataset-scan.R
##########
@@ -157,13 +157,19 @@ ScannerBuilder <- R6Class("ScannerBuilder", inherit = 
ArrowObject,
   public = list(
     Project = function(cols) {
       # cols is either a character vector or a named list of Expressions
-      if (!is.character(cols)) {
-        # We don't yet support mutate() on datasets, so this is just a list
-        # of FieldRefs, and we need to back out the field names
-        cols <- get_field_names(cols)
+      if (is.character(cols)) {
+        dataset___ScannerBuilder__ProjectNames(self, cols)

Review comment:
       In what circumstance will `is.character(cols)` be `TRUE`? I've running a 
bunch of examples and I've never seen the code take this path.

##########
File path: r/R/dataset-scan.R
##########
@@ -157,13 +157,19 @@ ScannerBuilder <- R6Class("ScannerBuilder", inherit = 
ArrowObject,
   public = list(
     Project = function(cols) {
       # cols is either a character vector or a named list of Expressions
-      if (!is.character(cols)) {
-        # We don't yet support mutate() on datasets, so this is just a list
-        # of FieldRefs, and we need to back out the field names
-        cols <- get_field_names(cols)
+      if (is.character(cols)) {
+        dataset___ScannerBuilder__ProjectNames(self, cols)

Review comment:
       In what circumstance will `is.character(cols)` be `TRUE`? I've been 
running a bunch of examples and I've never seen the code take this path.




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