AlenkaF commented on code in PR #40661:
URL: https://github.com/apache/arrow/pull/40661#discussion_r1530022681


##########
python/pyarrow/src/arrow/python/arrow_to_pandas.cc:
##########
@@ -2320,6 +2329,16 @@ class ConsolidatedBlockCreator : public 
PandasBlockCreator {
       if (arrays_[column_index]->type()->id() == Type::EXTENSION) {
         arrays_[column_index] = GetStorageChunkedArray(arrays_[column_index]);
       }
+      // In case of a RunEndEncodedArray default to the storage type
+      else if (arrays_[column_index]->type()->id() == Type::RUN_END_ENCODED) {
+        ARROW_ASSIGN_OR_RAISE(Datum decoded,
+                              compute::RunEndDecode(arrays_[column_index]));
+        // ARROW_ASSIGN_OR_RAISE(
+        //     Datum decoded, arrays_[column_index]->num_chunks() > 1
+        //                        ? 
compute::RunEndDecode(arrays_[column_index])
+        //                        : 
compute::RunEndDecode(arrays_[column_index]->chunk(0)));

Review Comment:
   Keeping all the cases where `ChunkedArray` might have one chunk commented 
out in case it will be needed. I do not think it will be, but saw it being used 
in 
https://github.com/apache/arrow/blob/6c06b37434f865e52c69951ad9de40b36895be0d/cpp/src/arrow/compute/kernels/vector_run_end_encode_test.cc#L209-L212
 and 
https://github.com/apache/arrow/blob/6c06b37434f865e52c69951ad9de40b36895be0d/cpp/src/arrow/compute/kernels/vector_run_end_encode_test.cc#L170-L176



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