-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
GH-45167: [C++] Implement Compute Equals for List Types #45272
base: main
Are you sure you want to change the base?
Conversation
|
position(arr.offset) {} | ||
|
||
T operator()() { | ||
// TODO: how cann we avoid the ToArray call |
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 think this is the remaining piece that needs to be fixed. I noticed the test failures appear when taking slices of the Arrays, and I think that ends up flattening potentially chunked arrays into a single array given this ToArray
call.
Is there some other facility already in the code base to help get a ListScalar from an ArraySpan that I may be overlooking? If not, should that be implemented here directly, or somewhere within the ArraySpan class?
AFAICT the ArraySpan class only returns pointers to physical, primitive types at the moment
573867e
to
649e3b0
Compare
const auto child_offset = values.offset; | ||
|
||
// TODO: do not hard code child type. also need to be aware of non-primitive children | ||
const auto array_data = ArrayData::Make(int32(), len, std::move(bufs), null_count, |
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.
Definitely do not want to hard code the data type here but I'm not sure what facilities can help select from the ListArray generically - do these exist already or would they need to be built out in this function?
Rationale for this change
While equality exists for ListScalars, it is not available through the compute module. This makes that now possible.
What changes are included in this PR?
I have added equals and not_equals support to the compute module for list types
Are these changes tested?
Yes - see added changes
Are there any user-facing changes?
Yes - the new feature to allow list comparison through the compute module