-
Notifications
You must be signed in to change notification settings - Fork 14
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
ARROW-238 Add Support for nested ObjectIDs in polars conversion #220
Conversation
_arrow_to_polars currently has no support to cast extension types for nested fields. This prohibits ObjectIDs to be read in case they are in nested fields.
Thank you for you submission. It looks good to me. We are waiting on Polars to support ExtensionTypes, but in the meantime, I don't see why we wouldn't add this. I cannot recall why we commented out the list and struct cases before. Please give us a few days to review. Here is the link to the mongo-arrow task: https://jira.mongodb.org/browse/ARROW-202. It contains links to the Polars issues. |
Hi @sibbiii . I'm sorry for the delay. I've been very busy. Would you please add a couple tests of this new functionality? |
14933f8
to
c771c0d
Compare
Hey @caseyclements , |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thank you!
Hi,
_arrow_to_polars currently has no support to cast extension types for nested fields.
This prohibits ObjectIDs to be read in case they are in nested fields.
I could not manage the conversion with the original code,
but I found a way to using
arrow_table_without_extensions = arrow_table.cast(schema_without_extensions)
to cast the schema of the whole table in one go.
The schema_without_extensions is created recursively from the old schema.
Support for lists is still to be added, should not be that hard, maybe I try tomorrow.
I am not an expert in apache arrow. My world is Pandas and Polars.
I have wrote some unit tests locally to test the code, but I do not feel confident that I have not overlooked
something, so please review carefully.
#219