aucahuasi commented on a change in pull request #11159:
URL: https://github.com/apache/arrow/pull/11159#discussion_r708775292
##########
File path: cpp/src/arrow/compute/kernels/vector_nested.cc
##########
@@ -169,6 +206,22 @@ void RegisterVectorNested(FunctionRegistry* registry) {
DCHECK_OK(registry->AddFunction(std::move(flatten)));
DCHECK_OK(registry->AddFunction(std::make_shared<ListParentIndicesFunction>()));
+
+ auto list_element = std::make_shared<VectorFunction>("list_element",
Arity::Binary(),
+ &list_element_doc);
+ DCHECK_OK(list_element->AddKernel(
+ {InputType::Array(Type::LIST), InputType::Scalar(Type::INT32)},
+ OutputType(ListValuesType), ListElement<ListType, Int32Type>));
+ DCHECK_OK(list_element->AddKernel(
+ {InputType::Array(Type::LIST), InputType::Scalar(Type::INT64)},
+ OutputType(ListValuesType), ListElement<ListType, Int64Type>));
+ DCHECK_OK(list_element->AddKernel(
+ {InputType::Array(Type::LARGE_LIST), InputType::Scalar(Type::INT32)},
+ OutputType(ListValuesType), ListElement<LargeListType, Int32Type>));
+ DCHECK_OK(list_element->AddKernel(
+ {InputType::Array(Type::LARGE_LIST), InputType::Scalar(Type::INT64)},
+ OutputType(ListValuesType), ListElement<LargeListType, Int64Type>));
+ DCHECK_OK(registry->AddFunction(std::move(list_element)));
Review comment:
Good catch, I'll work on that tomorrow. Thanks @lidavidm
--
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]