pitrou commented on code in PR #45272:
URL: https://github.com/apache/arrow/pull/45272#discussion_r2190795023


##########
cpp/src/arrow/compute/kernels/codegen_internal.h:
##########
@@ -425,6 +457,14 @@ struct UnboxScalar<Type, enable_if_has_string_view<Type>> {
   }
 };
 
+template <typename Type>
+struct UnboxScalar<Type, enable_if_list_type<Type>> {
+  using T = ArraySpan;
+  using ScalarT = typename TypeTraits<Type>::ScalarType;
+
+  static T Unbox(const Scalar& val) { return T{checked_cast<const 
ScalarT&>(val)}; }

Review Comment:
   Similarly, if you want use `UnboxScalar` for list scalars, it should return 
a `ArraySpan` of the embedded value (which is already an array of the list's 
child type).



-- 
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: github-unsubscr...@arrow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to