ZhangHuiGui commented on code in PR #41295:
URL: https://github.com/apache/arrow/pull/41295#discussion_r1573125155
##########
cpp/src/arrow/compute/kernels/codegen_internal.cc:
##########
@@ -56,9 +56,16 @@ Result<TypeHolder> LastType(KernelContext*, const
std::vector<TypeHolder>& types
return types.back();
}
-Result<TypeHolder> ListValuesType(KernelContext*, const
std::vector<TypeHolder>& args) {
- const auto& list_type = checked_cast<const BaseListType&>(*args[0].type);
- return list_type.value_type().get();
+Result<TypeHolder> ListValuesType(KernelContext* ctx,
+ const std::vector<TypeHolder>& args) {
+ auto list_type = checked_cast<const BaseListType*>(args[0].type);
+ auto value_type = list_type->value_type().get();
+ for (auto value_kind = value_type->id();
+ is_list(value_kind) || is_list_view(value_kind); value_kind =
value_type->id()) {
+ list_type = checked_cast<const
BaseListType*>(list_type->value_type().get());
+ value_type = list_type->value_type().get();
+ }
Review Comment:
Ah, i understand what you mean. It's not correct!
--
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]