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


##########
python/pyarrow/array.pxi:
##########
@@ -232,6 +232,11 @@ def array(object obj, type=None, mask=None, size=None, 
from_pandas=None,
     else:
         c_from_pandas = from_pandas
 
+    if isinstance(obj, Array):
+        if type is not None and not obj.type.equals(type):
+            obj = obj.cast(type)

Review Comment:
   To update the thread: as we discussed I will add the change to the `cast()` 
method to accept `memory_pool` argument as a part of this PR.



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