Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[R] Problem with rlang reverse dependency checks #28885

Closed
asfimport opened this issue Jun 28, 2021 · 6 comments
Closed

[R] Problem with rlang reverse dependency checks #28885

asfimport opened this issue Jun 28, 2021 · 6 comments

Comments

@asfimport
Copy link

From: https://github.com/r-lib/rlang/blob/master/revdep/problems.md#arrow

 

arrow

Newly broken

  • checking tests ... ERROR
    Running ‘testthat.R’
    Running the tests in ‘tests/testthat.R’ failed.
    Last 13 lines of output:
    1. ├─arrow:::expect_dplyr_equal(...) test-dplyr.R:96:2
    2. │ └─rlang::eval_tidy(expr, rlang::new_data_mask(rlang::env(input = record_batch(tbl)))) helper-expectation.R:79:4
    3. ├─input %>% group_by(chr) %>% select() %>% collect()
    4. ├─dplyr::collect(.)
    5. └─arrow:::collect.arrow_dplyr_query(.)
    6. └─arrow:::ensure_group_vars(x)
    7. ├─arrow:::make_field_refs(gv, dataset = query_on_dataset(.data))
    8. └─arrow:::query_on_dataset(.data)
    9. ├─x$.data
    10. └─rlang:::`$.rlang_fake_data_pronoun`(x, ".data")
    11. └─rlang:::stop_fake_data_subset()
    
    [ FAIL 2 \| WARN 0 | SKIP 60 | PASS 3778 ]
    Error: Test failures
    Execution halted
    

In both

  • checking installed package size ... NOTE

    installed size is 58.8Mb
    sub-directories of 1Mb or more:
    R 3.6Mb
    libs 54.5Mb
    

     

Reporter: Romain Francois / @romainfrancois
Assignee: Nicola Crane / @thisisnic

Note: This issue was originally created as ARROW-13195. Please see the migration documentation for further details.

@asfimport
Copy link
Author

Romain Francois / @romainfrancois:
I could reproduce with cran arrow

 

library(arrow, warn.conflicts = FALSE)
library(dplyr, warn.conflicts = FALSE)
library(rlang)
#> 
#> Attaching package: 'rlang'
#> The following object is masked from 'package:arrow':
#> 
#> string

tbl <- tibble::tibble(
 chr = letters[c(1:5, NA, 7:10)]
)
mask <- new_data_mask(env(input = record_batch(tbl)))
expr <- quo(input %>% group_by(chr) %>% select() %>% collect())
eval_tidy(expr, mask)
#> Error: Can't subset `.data` outside of a data mask context.

 

but it appears to be fixed on dev. It was an issue with ensure_group_vars()https://github.com/cran/arrow/blob/29aca94a7f9fdff267d58e63c34b1b9ab1c031c0/R/dplyr.R#L728

 

@asfimport
Copy link
Author

Neal Richardson / @nealrichardson:
Ok, so just to be sure, we should run tests with dev rlang installed and confirm? Or is this no longer a problem?

@asfimport
Copy link
Author

Nicola Crane / @thisisnic:
Just test this locally with the CRAN versions of these packages and didn't get the same issue:

arrow 4.0.1
rlang 0.4.11
dplyr 1.0.7

However, when I tried it again with dev rlang, I could reproduce it, so looks like it's still a problem.

On dev Arrow, it's not an issue.

@asfimport
Copy link
Author

Neal Richardson / @nealrichardson:
dev rlang and dev arrow?

@asfimport
Copy link
Author

Nicola Crane / @thisisnic:
(sorry, updated my comment after you posted yours! - only an issue on CRAN arrow)

@asfimport
Copy link
Author

Todd Farmer / @toddfarmer:
Transitioning issue from Resolved to Closed to based on resolution field value.

@asfimport asfimport added this to the 5.0.0 milestone Jan 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants