thisisnic commented on pull request #10519: URL: https://github.com/apache/arrow/pull/10519#issuecomment-860792424
Awesome, thanks! Another really minor change to suggest: the approach to your unit tests is great; however, there's a helper function in the Arrow package called `expect_dplyr_equal`. It takes an R expression and a tibble as inputs, and then directly compares the results of executing the `arrow` version with the results of executing the `dplyr` version. The benefit of using this function is that it will compare how things work both on Arrow tables *and* Arrow record batches at the same time. You can see it in action here: https://github.com/apache/arrow/blob/b81fcf73ee7722147868e94f0cc1040f7eb51c79/r/tests/testthat/test-dplyr-mutate.R#L37-L46 The code for the function is here (though you don't have to read it to be able to use it!): https://github.com/apache/arrow/blob/b81fcf73ee7722147868e94f0cc1040f7eb51c79/r/tests/testthat/helper-expectation.R#L73-L106 Please could you update the test you added to use `expect_dplyr_equal` instead of `expect_equal`? It took me a couple of tries to fully understand how `expect_dplyr_equal` works, so if you have any questions, let me know! :) -- 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: [email protected]
