You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2020/12/30 23:49:36 UTC

[GitHub] [arrow] nealrichardson commented on a change in pull request #9051: ARROW-10668: [R] Support for the .data pronoun

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



##########
File path: r/R/dplyr.R
##########
@@ -265,6 +267,8 @@ filter_mask <- function(.data) {
   # Then add the column references
   # Renaming is handled automatically by the named list
   env_bind(f_env, !!!lapply(.data$selected_columns, var_binder))
+  # Then bind the data pronoun
+  env_bind(f_env, .data = data_pronoun)

Review comment:
       What about this (and delete the data_pronoun defs above)?
   
   ```suggestion
     data_pronoun <- lapply(.data$selected_columns, var_binder)
     env_bind(f_env, !!!data_pronoun)
     # Then bind the data pronoun
     env_bind(f_env, .data = data_pronoun)
   ```
   
   I think L261 will miss the column renaming but this will pick it up (and should be marginally more efficient)




----------------------------------------------------------------
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:
users@infra.apache.org