ARROW-8938: [R] Provide binding for arrow::compute::CallFunction#7279
ARROW-8938: [R] Provide binding for arrow::compute::CallFunction#7279nealrichardson wants to merge 7 commits intoapache:masterfrom
Conversation
| i <- Array$create(i) | ||
| } | ||
| if (inherits(i, "ChunkedArray")) { | ||
| # Invalid: Kernel does not support chunked array arguments |
There was a problem hiding this comment.
@wesm I didn't see a JIRA for this but admittedly there are a lot attached to the umbrella ticket so I may have missed it. Is there one for supporting Take with ChunkedArrays (as either the first and/or second argument)? Likewise for Take/Filter on RecordBatch and Table.
There was a problem hiding this comment.
|
@github-actions autotune |
wesm
left a comment
There was a problem hiding this comment.
Cool, this should be helpful to simplify exposing compute functionality
Co-authored-by: Benjamin Kietzman <[email protected]>
nealrichardson
left a comment
There was a problem hiding this comment.
Thanks for doing this
wesm
left a comment
There was a problem hiding this comment.
Some small comments. This looks OK to me modulo CI
|
|
||
| std::shared_ptr<arrow::compute::FunctionOptions> make_compute_options( | ||
| std::string func_name, List_ options) { | ||
| if (func_name == "filter") { |
There was a problem hiding this comment.
Nit: might want to put these function names in constants or defines (doesn't need to be done this patch)
r/src/scalar.cpp
Outdated
| #include <arrow/scalar.h> | ||
|
|
||
| // [[arrow::export]] | ||
| std::shared_ptr<arrow::Scalar> Array__GetScalar(const std::shared_ptr<arrow::Array>& x, int64_t i) { |
There was a problem hiding this comment.
I removed the bespoke Scalar__create logic in favor of reusing the Array logic, like we are doing on the scalar-to-vector side. Scalar$create creates a length-1 Array and takes the 0th element as a Scalar. This added support for nested types as Scalar for free, and prevents other inconsistencies from arising.
|
There's more to do but this is enough to provide a foundation for future compute work in R. |
|
+1 |
No description provided.