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


##########
r/tests/testthat/test-metadata.R:
##########
@@ -383,6 +383,7 @@ test_that("grouped_df metadata is recorded (efficiently)", {
   grouped_tab <- Table$create(grouped)
   expect_r6_class(grouped_tab, "Table")
   expect_equal(grouped_tab$r_metadata$attributes$.group_vars, "a")
+  expect_equal(grouped_tab$metadata$r$attributes$.group_vars, "a")

Review Comment:
   L385 and L386 are the same thing, we don't need both tests (pick one, either 
is fine)



##########
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:
   We know they're empty so we can simplify this
   
   ```suggestion
   groups.Dataset <- groups.ArrowTabular <- groups.RecordBatchReader <- 
function(x) list()
   ```
   
   The result is the same:
   
   ```
   > identical(rlang::syms(character(0)), list())
   [1] TRUE
   ```



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