bkietz commented on code in PR #40482:
URL: https://github.com/apache/arrow/pull/40482#discussion_r1526362743


##########
python/pyarrow/src/arrow/python/arrow_to_pandas.cc:
##########
@@ -826,6 +830,37 @@ Status ConvertListsLike(PandasOptions options, const 
ChunkedArray& data,
   return Status::OK();
 }
 
+template <class T>
+struct ListViewConversionType;
+
+template <>
+struct ListViewConversionType<ListViewType> {
+  using type = ListType;
+};
+
+template <>
+struct ListViewConversionType<LargeListViewType> {
+  using type = LargeListType;
+};

Review Comment:
   What you suggested seems fine, but personally I'd prefer an inline type 
expression over a dedicated trait here:
   ```c++
   template <typename T>
   enable_if_list_view<T, Status> ConvertListsLike(PandasOptions options,
                                                   const ChunkedArray& data,
                                                   PyObject** out_values) {
     using ListViewArrayType = typename TypeTraits<T>::ArrayType;
     using NonViewType = std::conditional_t<T::type_id == Type::LIST_VIEW,
         ListType, LargeListType>;
   ```
   



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