paleolimbot commented on code in PR #13706:
URL: https://github.com/apache/arrow/pull/13706#discussion_r957341060
##########
r/R/query-engine.R:
##########
@@ -238,18 +227,13 @@ ExecPlan <- R6Class("ExecPlan",
slice_size <- node$extras$head %||% node$extras$tail
if (!is.null(slice_size)) {
out <- head(out, slice_size)
- # We already have everything we need for the head, so StopProducing
- self$Stop()
Review Comment:
Because of the change to `head.RecordBatchReader()`, no batches get pulled
when `head(out)` is called (which is need to make sure that the ExecPlan can
continue to defer StartProducing()). The C++ implementation of
`head.RecordBatchReader()` takes care of calling `Close()` on the upstream
reader (which, if it's an ExecPlanReader, will call `StopProducing()`. I should
add a test to make sure that's the case though!
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]