pitrou commented on code in PR #45272:
URL: https://github.com/apache/arrow/pull/45272#discussion_r1927415730


##########
cpp/src/arrow/compute/kernels/codegen_internal.h:
##########
@@ -322,6 +329,26 @@ struct ArrayIterator<Type, enable_if_base_binary<Type>> {
   }
 };
 
+template <typename Type>
+struct ArrayIterator<Type, enable_if_list_type<Type>> {
+  using T = typename TypeTraits<Type>::ScalarType;
+  using ArrayT = typename TypeTraits<Type>::ArrayType;
+  using offset_type = typename Type::offset_type;
+
+  const ArraySpan& arr;
+  int64_t position;
+
+  explicit ArrayIterator(const ArraySpan& arr) : arr(arr), position(0) {}
+
+  T operator()() {
+    const auto array_ptr = arr.ToArray();

Review Comment:
   This is going to be slow, so we probably want to avoid this IMHO.
   
   You may want to run a crude benchmark from Python to check this.



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