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 2022/07/15 13:47:24 UTC

[GitHub] [arrow] eitsupi commented on a diff in pull request #13621: ARROW-17085: [R] group_vars() should not return NULL

eitsupi commented on code in PR #13621:
URL: https://github.com/apache/arrow/pull/13621#discussion_r922182885


##########
r/R/dplyr-group-by.R:
##########
@@ -58,13 +58,13 @@ group_by.arrow_dplyr_query <- function(.data,
 group_by.Dataset <- group_by.ArrowTabular <- group_by.RecordBatchReader <- group_by.arrow_dplyr_query
 
 groups.arrow_dplyr_query <- function(x) syms(dplyr::group_vars(x))
-groups.Dataset <- groups.ArrowTabular <- groups.RecordBatchReader <- function(x) NULL
+groups.Dataset <- groups.ArrowTabular <- groups.RecordBatchReader <- function(x) syms(dplyr::group_vars(x))

Review Comment:
   `group_vars.ArrowTabular` may return groups.
   Cases such as the following:.
   
   ```r
   mtcars |> dplyr::group_by(cyl)  |> arrow::arrow_table()|> dplyr::groups()
   ```
   
   Would it be better to move the ArrowTabular case to the same line as `groups.arrow_dplyr_query`?



-- 
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: github-unsubscribe@arrow.apache.org

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