You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "Romain Francois (Jira)" <ji...@apache.org> on 2021/11/15 08:57:00 UTC

[jira] [Created] (ARROW-14712) [R] compare_dplyr_error() too strict

Romain Francois created ARROW-14712:
---------------------------------------

             Summary: [R] compare_dplyr_error() too strict
                 Key: ARROW-14712
                 URL: https://issues.apache.org/jira/browse/ARROW-14712
             Project: Apache Arrow
          Issue Type: Improvement
          Components: R
            Reporter: Romain Francois


dplyr errors are about to be updated and so the mechanism used by compare_dplyr_error() fails:

I'm seeing this on the revdeps :

{{══ Failed tests ════════════════════════════════════════════════════════════════}}
{{── Error (test-dplyr-filter.R:263:3): filter environment scope ─────────────────}}
{{Error in `lapply(args, function(x) {}}
{{{}if (!inherits(x, "Expression")){}}}{{{}{ x <- Expression$scalar(x) }{}}}{{{}x{}}}
{{})`: object 'b_var' not found}}
{{Backtrace:}}
{{▆}}
{{1. ├─arrow:::expect_dplyr_error(input %>% filter(chr == b_var), tbl) at test-dplyr-filter.R:263:2}}
{{2. │ ├─testthat::expect_error(...) at tests/testthat/helper-expectation.R:158:2}}
{{3. │ │ └─testthat:::expect_condition_matching(...)}}
{{4. │ │ └─testthat:::quasi_capture(...)}}
{{5. │ │ ├─testthat .capture(...)}}
{{6. │ │ │ └─base::withCallingHandlers(...)}}
{{7. │ │ └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))}}
{{8. │ └─rlang::eval_tidy(expr, rlang::new_data_mask(rlang::env(input = record_batch(tbl))))}}
{{9. ├─input %>% filter(chr == b_var)}}
{{10. ├─dplyr::filter(., chr == b_var)}}
{{11. └─arrow:::filter.ArrowTabular(., chr == b_var)}}
{{12. └─base::lapply(filts, arrow_eval, arrow_mask(.data))}}
{{13. └─arrow FUN(X[[i]], ...)}}
{{14. └─base::tryCatch(...)}}
{{15. └─base tryCatchList(expr, classes, parentenv, handlers)}}
{{16. └─base tryCatchOne(expr, names, parentenv, handlers[[1L]])}}
{{{}17. └─value[[3L]](cond){}}}{{{}[ FAIL 1 | WARN 3 | SKIP 58 | PASS 5783 ]{}}}
{{Error: Test failures}}
{{{}Execution halted{}}}{{{}1 error x | 0 warnings ✓ | 1 note x{}}}

 

here's a reprex showing what's happening: 

{{``` r}}
{{library(dplyr, warn.conflicts = FALSE)}}
{{{}library(arrow, warn.conflicts = FALSE){}}}{{{}E <- function(expr) \{ tryCatch(expr, error = function(cnd) print(cnd, backtrace = FALSE))}{}}}{{{}tbl <- tibble::tibble({}}}
{{  chr = letters[c(1:5, NA, 7:10)]}}
{{{}){}}}{{{}E({}}}
{{  tbl %>% }}
{{    filter(chr == b_var)}}
{{)}}
{{#> <error/rlang_error>}}
{{#> Error in `filter()`:}}
{{#>   Problem while computing `..1 = chr == b_var`.}}
{{#> Caused by error:}}
{{#>   object 'b_var' not found}}
{{E(}}
{{  record_batch(tbl) %>% }}
{{    filter(chr == b_var)}}
{{)}}
{{#> <simpleError in lapply(args, function(x) \{    if (!inherits(x, "Expression")) {        x <- Expression$scalar(x)    }    x}): object 'b_var' not found>}}
{{{}```{}}}{{{}<sup>Created on 2021-11-15 by the [reprex package](https://reprex.tidyverse.org) (v2.0.1.9000)</sup>{}}}



--
This message was sent by Atlassian Jira
(v8.20.1#820001)