jonkeane commented on a change in pull request #10888: URL: https://github.com/apache/arrow/pull/10888#discussion_r697644390
########## File path: r/tests/testthat/test-dataset.R ########## @@ -1071,6 +1071,60 @@ test_that("Scanner$ToRecordBatchReader()", { ) }) +test_that("Scanner$create() filter/projection pushdown", { + ds <- open_dataset(dataset_dir, partitioning = "part") + + # the standard to compare all Scanner$create()s against + scan_one <- ds %>% + filter(int > 7 & dbl < 57) %>% + select(int, dbl, lgl) %>% + mutate(int_plus = int + 1, dbl_minus = dbl - 1) %>% + Scanner$create() + + # add a column in projection + scan_two <- ds %>% + filter(int > 7 & dbl < 57) %>% + select(int, dbl, lgl) %>% + mutate(int_plus = int + 1) %>% + Scanner$create(projection = list( + "int", "dbl", "lgl", "int_plus", Review comment: Yeah, you're right — I've backed out the ability to commingle these and now you either can do all characters _or_ expressions (with possibly many `a = Expression$field_ref("a")`) -- 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: github-unsubscr...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org