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



##########
File path: r/tests/testthat/helper-expectation.R
##########
@@ -98,12 +103,16 @@ expect_dplyr_equal <- function(expr, # A dplyr pipeline 
with `input` as its star
 expect_dplyr_error <- function(expr, # A dplyr pipeline with `input` as its 
start
                                tbl,  # A tbl/df as reference, will make 
RB/Table with
                                ...) {
+  # ensure we have supplied tbl
+  tbl
+  
   expr <- rlang::enquo(expr)
   msg <- tryCatch(
     rlang::eval_tidy(expr, rlang::new_data_mask(rlang::env(input = tbl))),
     error = function (e) conditionMessage(e)

Review comment:
       @jonkeane I don't fully understand why this is necessary, but as it 
turns out your regular expressions are already encapsulated in 
`i18ize_error_messages()` 
(https://github.com/apache/arrow/blob/master/r/R/dplyr.R#L374), so maybe that 
can be reused.
   
   Also I believe you just want to return `msg` from this, not a `try-error`, 
at least that's the current behavior and also what the early returns you added 
do.




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


Reply via email to