-
Notifications
You must be signed in to change notification settings - Fork 4k
ARROW-8938: [R] Provide binding for arrow::compute::CallFunction #7279
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| i <- Array$create(i) | ||
| } | ||
| if (inherits(i, "ChunkedArray")) { | ||
| # Invalid: Kernel does not support chunked array arguments |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
@github-actions autotune |
wesm
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool, this should be helpful to simplify exposing compute functionality
Co-authored-by: Benjamin Kietzman <bengilgit@gmail.com>
nealrichardson
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for doing this
wesm
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.