-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pl.from_arrow
failing when underlying arrays are immutable
#6315
Comments
Mutability should not matter. Can you try to make an MWE? |
Sorry, I can't seem to get an MWE yet. I did some further investigation and found performing a deepcopy of the table also does work, and that if the underlying buffer is set to value, it seems to fail.
|
If you have one. Please let us know. With this information it's hard for us help you. |
We have run into the same error and I think it is due to data alignement. Here is a reproduction:
|
For the record, the same kind of issue happened with acero : https://issues.apache.org/jira/browse/ARROW-18115 and the solution apparently was to introduce a realignement function https://issues.apache.org/jira/browse/ARROW-18119 . |
Issue upstream: apache/arrow#32276 I am inclined to think this is a bug upstream. I would assume that memory would need to be aligned with the type. In this case with an |
After states that alignment is a recommendation:
but that for IPC they are enforced:
So this is a bug in pyarrow. |
hey, can you link the bug report in pyarrow, please ? The linked issue is for polars and its also missing the link. thanks |
This now works on the latest pyarrow/polars versions. |
Polars version checks
I have checked that this issue has not already been reported.
I have confirmed this bug exists on the latest version of Polars.
Issue description
pl.from_arrow
fails when an underlying array in pa.table is immutable.I can't give a full reproducible example as I'm unsure how to create immutable arrays in pyarrow, and the pyarrow table I'm working on comes from elsewhere. The pyarrow documentation only says mutable arrays can be created.
Exception that is thrown:
Reproducible example
Expected behavior
Expected: Returns polars dataframe
Installed versions
The text was updated successfully, but these errors were encountered: