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


##########
python/pyarrow/array.pxi:
##########
@@ -2851,6 +2851,103 @@ cdef class StructArray(Array):
         return self.take(indices)
 
 
+cdef class RunEndEncodedArray(Array):
+    """
+    Concrete class for Arrow run-end encoded arrays.
+    """
+
+    @staticmethod
+    def from_arrays(logical_length, run_ends, values, type=None):
+        """
+        Construct RunEndEncodedArray from run_ends and values arrays.
+
+        Parameters
+        ----------
+        logical_length : int
+            The logical length of the run-end encoded array.

Review Comment:
   The explicit length is used to validate the `run_ends` array. I can't simply 
take `run_ends[-1]` without also checking the physical length of `values`.



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