From 800fb99c0924109c2e92c41577d13ab013a266ed Mon Sep 17 00:00:00 2001 From: Nic Crane Date: Fri, 15 Jul 2022 08:57:47 +0100 Subject: [PATCH] Remove calls to Bind --- r/src/compute-exec.cpp | 8 -------- r/tests/testthat/test-dataset.R | 4 ++++ 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/r/src/compute-exec.cpp b/r/src/compute-exec.cpp index 76112b4cefd97..b30ecfb3472d9 100644 --- a/r/src/compute-exec.cpp +++ b/r/src/compute-exec.cpp @@ -146,20 +146,12 @@ std::shared_ptr ExecNode_Scan( options->dataset_schema = dataset->schema(); - // ScanNode needs the filter to do predicate pushdown and skip partitions - options->filter = ValueOrStop(filter->Bind(*dataset->schema())); - // ScanNode needs to know which fields to materialize (and which are unnecessary) std::vector exprs; for (const auto& name : materialized_field_names) { exprs.push_back(compute::field_ref(name)); } - options->projection = - ValueOrStop(call("make_struct", std::move(exprs), - compute::MakeStructOptions{std::move(materialized_field_names)}) - .Bind(*dataset->schema())); - return MakeExecNodeOrStop("scan", plan.get(), {}, ds::ScanNodeOptions{dataset, options}); } diff --git a/r/tests/testthat/test-dataset.R b/r/tests/testthat/test-dataset.R index 6d8b5c145daec..019b5ec1c0ad1 100644 --- a/r/tests/testthat/test-dataset.R +++ b/r/tests/testthat/test-dataset.R @@ -1240,4 +1240,8 @@ test_that("can add in augmented fields", { mutate(file_name = add_filenames()) %>% collect() + expect_named( + ds, + c("int", "dbl", "lgl", "chr", "fct", "ts", "group", "other", "file_name") + ) })