nealrichardson commented on code in PR #12950:
URL: https://github.com/apache/arrow/pull/12950#discussion_r856153177
##########
r/tests/testthat/test-dataset.R:
##########
@@ -966,3 +966,29 @@ test_that("dataset to C-interface to arrow_dplyr_query
with proj/filter", {
# must clean up the pointer or we leak
delete_arrow_array_stream(stream_ptr)
})
+
+
+test_that("Filter parquet dataset with is.na ARROW-15312", {
+ ds_path <- make_temp_dir()
+
+ df <- tibble(x = 1:3, y = c(0L, 0L, NA_integer_), z = c(0L, 1L, NA_integer_))
+ write_dataset(df, ds_path)
+
+ # OK: Collect then filter: returns row 3, as expected
+ expect_identical(
+ open_dataset(ds_path) %>% collect() %>% filter(is.na(y)),
+ df %>% collect() %>% filter(is.na(y))
+ )
+
+ # ERROR: Filter then collect (on y) returns a tibble with no row
Review Comment:
```suggestion
# Before the fix: Filter then collect on y returned a 0-row tibble
```
--
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]