milesgranger commented on code in PR #14326:
URL: https://github.com/apache/arrow/pull/14326#discussion_r988740974


##########
cpp/src/arrow/compute/kernels/scalar_nested.cc:
##########
@@ -242,6 +245,20 @@ struct StructFieldFunctor {
                                 union_array.GetFlattenedField(index, 
ctx->memory_pool()));
           break;
         }
+        case Type::LIST: {
+          const auto& list_array = checked_cast<const ListArray&>(*current);
+          ARROW_LOG(INFO) << list_array.ToString();
+          ARROW_ASSIGN_OR_RAISE(
+              Datum indices,
+              CallFunction("add", {list_array.offsets()->Slice(
+                                       0, list_array.offsets()->length() - 1),
+                                   MakeScalar(index)}));
+          ARROW_ASSIGN_OR_RAISE(Datum result, CallFunction("take", 
{list_array.values(),

Review Comment:
   Wow, sharp eye! That's easier. :eyes: 



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