edponce commented on a change in pull request #11159:
URL: https://github.com/apache/arrow/pull/11159#discussion_r712382304
##########
File path: cpp/src/arrow/compute/kernels/scalar_nested.cc
##########
@@ -80,6 +80,134 @@ const FunctionDoc list_value_length_doc{
"Null values emit a null in the output."),
{"lists"}};
+template <typename Type, typename IndexType>
+Status ListElementArray(KernelContext* ctx, const ExecBatch& batch, Datum*
out) {
+ using ListArrayType = typename TypeTraits<Type>::ArrayType;
Review comment:
`ListElementArray` is a function representing the `Exec` method but
`ListElementScalar` is a struct with an actual `Exec` method. I suggest to use
the same approach as other kernels and use a class with an `Exec` method, where
`Exec` dispatches the corresponding processing based on input types. With this
structure this kernel can be extended to support different combinations of
inputs shapes (e.g., scalar-scalar, scalar-array, etc).
Given that this is a scalar kernel
--
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]