From 5427055382398d1e2762247dd53d422329433a10 Mon Sep 17 00:00:00 2001 From: Dewey Dunnington Date: Mon, 25 Jul 2022 15:05:47 -0300 Subject: [PATCH] just kidding don't do that --- r/R/query-engine.R | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/r/R/query-engine.R b/r/R/query-engine.R index 08cfddb21e6a8..b2fdfd09ef481 100644 --- a/r/R/query-engine.R +++ b/r/R/query-engine.R @@ -226,9 +226,7 @@ ExecPlan <- R6Class("ExecPlan", # TODO(ARROW-16628): handle limit in ExecNode slice_size <- node$extras$head %||% node$extras$tail if (!is.null(slice_size)) { - out_head <- head(out, slice_size) - out$Close() - out <- out_head + out <- head(out, slice_size) } } else if (!is.null(node$extras$tail)) { # TODO(ARROW-16630): proper BottomK support