lidavidm commented on a change in pull request #11159:
URL: https://github.com/apache/arrow/pull/11159#discussion_r710237790
##########
File path: cpp/src/arrow/compute/kernels/codegen_internal.cc
##########
@@ -194,6 +194,11 @@ Result<ValueDescr> FirstType(KernelContext*, const
std::vector<ValueDescr>& desc
return result;
}
+Result<ValueDescr> ListValuesType(KernelContext*, const
std::vector<ValueDescr>& args) {
+ const auto& list_type = checked_cast<const BaseListType&>(*args[0].type);
+ return ValueDescr::Array(list_type.value_type());
Review comment:
I don't think there's anything complicated. `list_element([1, 2, 3], 1)
== Scalar(2)`. The idea behind a scalar function is that the scalar behavior
should follow from the array behavior; it's effectively as if you had a
length-1 array, except you accept a scalar and return a scalar.
--
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]