nealrichardson commented on code in PR #13397:
URL: https://github.com/apache/arrow/pull/13397#discussion_r927134442
##########
r/R/query-engine.R:
##########
@@ -81,8 +82,8 @@ ExecPlan <- R6Class("ExecPlan",
# head and tail are not ExecNodes; at best we can handle them via
# SinkNode, so if there are any steps done after head/tail, we need
to
# evaluate the query up to then and then do a new query for the rest.
- # as_record_batch_reader() will build and run an ExecPlan
- node <- self$SourceNode(as_record_batch_reader(.data$.data))
+ # as_arrow_table() will build and run an ExecPlan
+ node <- self$SourceNode(as_arrow_table(.data$.data))
Review Comment:
Yeah this would force you to consume the whole RBR to take the head, no
bueno. Can you detect whether a UDF is used in `.data$.data` and only do
`as_arrow_table` in that case? (Maybe even just whether there are any UDFs
registered is close enough?)
(Side note: this line will need special handling in #13541 too, it's a
sneaky place where `$Build()` actually starts running the query, which we don't
want there.)
--
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]