drin commented on code in PR #13857:
URL: https://github.com/apache/arrow/pull/13857#discussion_r947315291


##########
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:
   My jerk reaction is to prefer the existing chunk layouts, just in case the 
chunking was specially chosen for hardware or data placement reasons.



-- 
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]

Reply via email to