felipecrv commented on code in PR #41419:
URL: https://github.com/apache/arrow/pull/41419#discussion_r1583854772


##########
cpp/src/arrow/compute/kernels/scalar_if_else.cc:
##########
@@ -1807,7 +1808,8 @@ struct CaseWhenFunctor<Type, enable_if_base_binary<Type>> 
{
 };
 
 template <typename Type>
-struct CaseWhenFunctor<Type, enable_if_var_size_list<Type>> {
+struct CaseWhenFunctor<
+    Type, enable_if_t<is_base_list_type<Type>::value || 
is_list_view_type<Type>::value>> {

Review Comment:
   The list-view types should have their own specialization because they have a 
super-power that classic list types don't have: you can append the child values 
in any order and adjust the offset/size pairs of any random position to point 
to that area.
   
   Feel free to copy and paste this class and enable_if it for `is_list_view` 
with a `TODO(GH-<issue number>): a more efficient implementation for list-views 
is possible` comment mentioning an issue you can create about this. Then we can 
tackle the optimization in a separate PR.



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