AlenkaF commented on issue #49384: URL: https://github.com/apache/arrow/issues/49384#issuecomment-4134014162
Thank you for opening the issue, looks like this indeed is a bug. After doing some investigating, it looks like this happens when chunked array has only one chunk and can therefore be zero-copied (no missing values, etc.): ```python >>> np.array(pa.chunked_array([[1, 2, 3]]), copy=True).flags.writeable False >>> np.array(pa.chunked_array([[1, 2], [3]]), copy=True).flags.writeable True ``` The comment in the code: https://github.com/apache/arrow/blob/560ef02158131487b54cfb1f3883def10d9a67a7/python/pyarrow/table.pxi#L558 is valid for chunked arrays with number of chunks > 0. Otherwise the code needs to take into account the copy flag. I think the PR for this should be quite straightforward, contributions are most welcome! -- 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]
