Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions r/NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ Over 100 functions can now be called on Arrow objects inside a `dplyr` verb:
* `write_dataset()` now defaults to `format = "parquet"` and better validates the `format` argument
* Invalid input for `schema` in `open_dataset()` is now correctly handled
* Collecting 0 columns from a Dataset now no longer returns all of the columns
* The `Scanner$Scan()` method has been removed; use `Scanner$ScanBatches()`

## Other improvements

Expand Down
4 changes: 0 additions & 4 deletions r/R/arrowExports.R

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 1 addition & 6 deletions r/R/dataset-scan.R
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,7 @@
Scanner <- R6Class("Scanner", inherit = ArrowObject,
public = list(
ToTable = function() dataset___Scanner__ToTable(self),
ScanBatches = function() dataset___Scanner__ScanBatches(self),
Scan = function() {
# Planned for removal in ARROW-11782
.Deprecated("ScanBatches")
dataset___Scanner__Scan(self)
}
ScanBatches = function() dataset___Scanner__ScanBatches(self)
),
active = list(
schema = function() dataset___Scanner__schema(self)
Expand Down
16 changes: 0 additions & 16 deletions r/src/arrowExports.cpp

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

29 changes: 0 additions & 29 deletions r/src/dataset.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -450,35 +450,6 @@ std::shared_ptr<arrow::Table> dataset___Scanner__head(
return ValueOrStop(arrow::Table::FromRecordBatches(std::move(batches)));
}

// TODO (ARROW-11782) Remove calls to Scan()
#if defined(__GNUC__) || defined(__clang__)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
#elif defined(_MSC_VER)
#pragma warning(push)
#pragma warning(disable : 4996)
#endif

// [[dataset::export]]
cpp11::list dataset___Scanner__Scan(const std::shared_ptr<ds::Scanner>& scanner) {
auto it = ValueOrStop(scanner->Scan());
std::vector<std::shared_ptr<ds::ScanTask>> out;
std::shared_ptr<ds::ScanTask> scan_task;
// TODO(npr): can this iteration be parallelized?
for (auto st : it) {
scan_task = ValueOrStop(st);
out.push_back(scan_task);
}

return arrow::r::to_r_list(out);
}

#if defined(__GNUC__) || defined(__clang__)
#pragma GCC diagnostic pop
#elif defined(_MSC_VER)
#pragma warning(pop)
#endif

// [[dataset::export]]
std::shared_ptr<arrow::Schema> dataset___Scanner__schema(
const std::shared_ptr<ds::Scanner>& sc) {
Expand Down
10 changes: 1 addition & 9 deletions r/tests/testthat/test-dataset.R
Original file line number Diff line number Diff line change
Expand Up @@ -1345,14 +1345,6 @@ test_that("Dataset and query print methods", {
)
})

test_that("Scanner$Scan is deprecated", {
ds <- open_dataset(ipc_dir, partitioning = "part", format = "feather")
expect_deprecated(
ds$NewScan()$Finish()$Scan(),
"ScanBatches"
)
})

test_that("Scanner$ScanBatches", {
ds <- open_dataset(ipc_dir, format = "feather")
batches <- ds$NewScan()$Finish()$ScanBatches()
Expand Down Expand Up @@ -1388,7 +1380,7 @@ test_that("Assembling a Dataset manually and getting a Table", {
fmt <- FileFormat$create("parquet")
factory <- FileSystemDatasetFactory$create(fs, selector, NULL, fmt, partitioning = partitioning)
expect_r6_class(factory, "FileSystemDatasetFactory")

schm <- factory$Inspect()
expect_r6_class(schm, "Schema")

Expand Down