From 43dec7fc50f1e6a6f4e19619dbde8a1310ad87be Mon Sep 17 00:00:00 2001 From: Dewey Dunnington Date: Fri, 26 Aug 2022 16:47:24 -0300 Subject: [PATCH] nix the custom head method --- r/NAMESPACE | 1 - r/R/query-engine.R | 9 --------- r/tests/testthat/test-query-engine.R | 3 --- 3 files changed, 13 deletions(-) diff --git a/r/NAMESPACE b/r/NAMESPACE index 96550eb9230aa..c4c18ba16d744 100644 --- a/r/NAMESPACE +++ b/r/NAMESPACE @@ -95,7 +95,6 @@ S3method(dimnames,ArrowTabular) S3method(head,ArrowDatum) S3method(head,ArrowTabular) S3method(head,Dataset) -S3method(head,ExecPlanReader) S3method(head,RecordBatchReader) S3method(head,Scanner) S3method(head,arrow_dplyr_query) diff --git a/r/R/query-engine.R b/r/R/query-engine.R index 7a756cbe8275f..7b6733b9e8913 100644 --- a/r/R/query-engine.R +++ b/r/R/query-engine.R @@ -356,15 +356,6 @@ ExecPlanReader <- R6Class("ExecPlanReader", ) ) -# We need the head() of a ExecPlanReader to also be a ExecPlanReader -# because we need batches() and read_table() to evaluate in a way -# that supports user-defined functions. -#' @export -head.ExecPlanReader <- function(x, n = 6L, ...) { - head_reader <- NextMethod() - as_record_batch_reader(as_adq(head_reader)) -} - do_exec_plan_substrait <- function(substrait_plan) { if (is.string(substrait_plan)) { substrait_plan <- substrait__internal__SubstraitFromJSON(substrait_plan) diff --git a/r/tests/testthat/test-query-engine.R b/r/tests/testthat/test-query-engine.R index 1f5e6c96d7ee5..3c9561169927a 100644 --- a/r/tests/testthat/test-query-engine.R +++ b/r/tests/testthat/test-query-engine.R @@ -34,7 +34,6 @@ test_that("ExecPlanReader evaluates nested exec plans lazily", { expect_identical(reader$PlanStatus(), "PLAN_NOT_STARTED") head_reader <- head(reader, 4) - expect_identical(head_reader$PlanStatus(), "PLAN_NOT_STARTED") expect_identical(reader$PlanStatus(), "PLAN_NOT_STARTED") expect_equal( @@ -42,7 +41,6 @@ test_that("ExecPlanReader evaluates nested exec plans lazily", { arrow_table(a = 1:4) ) - expect_identical(head_reader$PlanStatus(), "PLAN_FINISHED") expect_identical(reader$PlanStatus(), "PLAN_FINISHED") }) @@ -58,7 +56,6 @@ test_that("ExecPlanReader evaluates head() lazily", { arrow_table(a = 1:4) ) - expect_identical(head_reader$PlanStatus(), "PLAN_FINISHED") expect_identical(reader$PlanStatus(), "PLAN_FINISHED") })