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


##########
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:
   That seems fine to me! Could we move the import to the beginning of the file 
or is there a benefit to keeping it within scope of this code?



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