wjones127 commented on code in PR #13857:
URL: https://github.com/apache/arrow/pull/13857#discussion_r948012133
##########
cpp/src/arrow/compute/kernels/vector_selection.cc:
##########
@@ -530,6 +683,54 @@ Status PrimitiveTake(KernelContext* ctx, const ExecSpan&
batch, ExecResult* out)
return Status::OK();
}
+Status ChunkedPrimitiveTake(KernelContext* ctx, const ExecBatch& batch, Datum*
out) {
+ const ChunkedArray& values = *batch[0].chunked_array();
+ const ChunkedArray& indices = *batch[1].chunked_array();
+
+ if (TakeState::Get(ctx).boundscheck) {
+ RETURN_NOT_OK(CheckIndexBounds(indices, values.length()));
+ }
+
+ // TODO: Is there any reason to chunk the output for primitive arrays?
+ // We probably want to keep within 32-bit sizes for interoperability with
other
+ // implementations.
Review Comment:
So, use the chunking of the take indices? I suppose that makes sense.
--
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]