paleolimbot opened a new pull request, #14518:
URL: https://github.com/apache/arrow/pull/14518

   This PR enables the following to work:
   
   ``` r
   library(arrow, warn.conflicts = FALSE)
   #> Some features are not enabled in this build of Arrow. Run `arrow_info()` 
for more information.
   
   register_scalar_function(
     "times_32",
     function(context, x) x * 32.0,
     int32(),
     float64(),
     auto_convert = TRUE
   )
   
   record_batch(a = 1:1000) |> 
     dplyr::mutate(b = times_32(a)) |> 
     as_record_batch_reader() |> 
     head(11) |> 
     as_arrow_table()
   #> Table
   #> 11 rows x 2 columns
   #> $a <int32>
   #> $b <double>
   ```
   
   (normally this isn't a problem because you should really call `head()` 
before `as_record_batch_reader()`, which communicates the top-k-ness of the 
query to the ExecPlan rather than relying on abandoning a RecordBatchReader; 
however, it still should work!)


-- 
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]

Reply via email to