Skip to content

Conversation

@nealrichardson
Copy link
Member

@nealrichardson nealrichardson commented May 26, 2020

No description provided.

@github-actions
Copy link

i <- Array$create(i)
}
if (inherits(i, "ChunkedArray")) {
# Invalid: Kernel does not support chunked array arguments
Copy link
Member Author

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.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nealrichardson
Copy link
Member Author

@github-actions autotune

Copy link
Member

@wesm wesm left a 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

nealrichardson and others added 2 commits May 27, 2020 09:44
Co-authored-by: Benjamin Kietzman <bengilgit@gmail.com>
Copy link
Member Author

@nealrichardson nealrichardson left a 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

Copy link
Member

@wesm wesm left a 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") {
Copy link
Member

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) {
Copy link
Member Author

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.

@nealrichardson nealrichardson marked this pull request as ready for review May 28, 2020 21:02
@nealrichardson
Copy link
Member Author

There's more to do but this is enough to provide a foundation for future compute work in R.

@wesm
Copy link
Member

wesm commented May 29, 2020

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants