Skip to content

Commit

Permalink
Take: Simplify TakeMetaFunction even further
Browse files Browse the repository at this point in the history
  • Loading branch information
felipecrv committed Jun 19, 2024
1 parent 98bebf4 commit 28da5e6
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions cpp/src/arrow/compute/kernels/vector_selection_take_internal.cc
Original file line number Diff line number Diff line change
Expand Up @@ -830,15 +830,9 @@ class TakeMetaFunction : public MetaFunction {
const auto& take_opts = static_cast<const TakeOptions&>(*options);
switch (args[0].kind()) {
case Datum::ARRAY:
// "array_take" can handle AA->A and AC->C cases directly
// (via their VectorKernel::exec and VectorKernel::exec_chunked)
if (index_kind == Datum::ARRAY || index_kind == Datum::CHUNKED_ARRAY) {
return CallArrayTake(args, take_opts, ctx);
}
break;
case Datum::CHUNKED_ARRAY:
// "array_take" can handle CA->C and CC->C cases directly
// (via their VectorKernel::exec_chunked)
// "array_take" can handle AA->A, AC->C, CA->C, CC->C cases directly
// (via their VectorKernel::exec and VectorKernel::exec_chunked)
if (index_kind == Datum::ARRAY || index_kind == Datum::CHUNKED_ARRAY) {
return CallArrayTake(args, take_opts, ctx);
}
Expand Down

0 comments on commit 28da5e6

Please sign in to comment.