thisisnic commented on code in PR #49795:
URL: https://github.com/apache/arrow/pull/49795#discussion_r3118325516
##########
r/tests/testthat/test-dplyr-filter.R:
##########
@@ -287,11 +287,21 @@ test_that("filter environment scope", {
})
test_that("Filtering on a column that doesn't exist errors correctly", {
+ # expect_warning(., NA) because the usual behavior when it hits a filter
+ # that it can't evaluate is to raise a warning, collect() to R, and retry
+ # the filter. But we want this to error the first time because it's
+ # a user error, not solvable by retrying in R
+ expect_warning(
+ expect_error(
+ tbl |> record_batch() |> filter(not_a_col == 42) |> collect(),
+ class = "validation_error"
+ ),
+ NA
+ )
+})
Review Comment:
Or should I just swap back in ` "object 'not_a_col' not found"` in the
English test instead of testing the error class actually? I see I left in an
extra change there...
--
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]