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


##########
python/pyarrow/array.pxi:
##########
@@ -118,11 +118,12 @@ def _handle_arrow_array_protocol(obj, type, mask, size):
     return res
 
 
-def _handle_run_end_encoded_arrays(obj, type):
+cdef _handle_run_end_encoded_arrays(object sequence, object mask, object size,
+                                    DataType type, CMemoryPool* pool,
+                                    c_bool from_pandas):
     from pyarrow.compute import run_end_encode
-    ree_arr = run_end_encode(obj)
-    return RunEndEncodedArray.from_arrays(
-        ree_arr.run_ends.to_pylist(), ree_arr.values.to_pylist(), type)
+    arr = _sequence_to_array(sequence, mask, size, type.value_type, pool, 
from_pandas)

Review Comment:
   Thinking that the code for each of the two separate cases (sequence and 
array-like) is now minimal and maybe we do not need a helper function anymore?



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