dragosmg commented on a change in pull request #11403:
URL: https://github.com/apache/arrow/pull/11403#discussion_r730920258



##########
File path: r/tests/testthat/helper-expectation.R
##########
@@ -64,24 +65,31 @@ verify_output <- function(...) {
   testthat::verify_output(...)
 }
 
-#' @param expr A dplyr pipeline with `input` as its start
-#' @param tbl A tbl/df as reference, will make RB/Table with
-#' @param skip_record_batch string skip message, if should skip RB test
-#' @param skip_table string skip message, if should skip Table test
-#' @param warning string expected warning from the RecordBatch and Table paths,
+#' Compare dplyr binding
+#'
+#' Comparing the output of running expressions on R objects against the same
+#' expression run on Arrow Tables and RecordBatches.
+#'
+#' @param expr A dplyr pipeline which must have `.input` as its start
+#' @param tbl A tibble or data.frame which will be substituted for `.input`
+#' @param skip_record_batch The skip message to show (if you should skip the 
RecordBatch test)
+#' @param skip_table The skip message to show (if you should skip the Table 
test)
+#' @param warning The expected warning from the RecordBatch and Table 
comparison paths,
 #'   passed to `expect_warning()`. Special values:
 #'     * `NA` (the default) for ensuring no warning message
 #'     * `TRUE` is a special case to mean to check for the
 #'      "not supported in Arrow; pulling data into R" message.
 #' @param ... additional arguments, passed to `expect_equal()`
-expect_dplyr_equal <- function(expr,
-                               tbl,
-                               skip_record_batch = NULL,
-                               skip_table = NULL,
-                               warning = NA,
-                               ...) {
+compare_dplyr_binding <- function(expr,
+                                  tbl,
+                                  skip_record_batch = NULL,
+                                  skip_table = NULL,
+                                  warning = NA,
+                                  ...) {
+
+  # Quote the contents of `expr` and evaluate it to get the expected value

Review comment:
       _Capture_ instead of _quote_? Maybe evaluate it as regular {dplyr} 
syntax.




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