Skip to content

Conversation

@blink1073
Copy link
Member

Fixes #257. Fixes #258.

Copy link
Contributor

@aclark4life aclark4life left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, so add

  • parent_names
  • parent_type

and check parent_type on iteration to store null values in the right place ? LGTM

@blink1073
Copy link
Member Author

The root bug was that we were using the top level document count to handle missing values, but that is not valid for nested documents, where missing values are dependent on how many parent documents there are.

@blink1073
Copy link
Member Author

Separately, we we not handling null values in lists properly, resulting in an empty list entry where it should have been None in the final Python list.

@blink1073 blink1073 merged commit c74c9a6 into mongodb-labs:main Jan 22, 2025
43 of 44 checks passed
@blink1073 blink1073 deleted the better-nested-nulls branch January 22, 2025 16:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Optional fields on pyarrow structs triggers error Incorrect null and missing value handling in nested data

2 participants