Skip to content
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

Fix reading required string values inside an optional group #481

Merged
merged 2 commits into from
Aug 13, 2024

Conversation

adamreeve
Copy link
Contributor

@adamreeve adamreeve commented Aug 13, 2024

Fixes #480.

When string values are required and inside an optional nested group, the group is skipped over in LogicalBatchReaderFactory and we only use a single LeafReader instance to read values. This should read null into destination rows where the enclosing group is null. But when _nullableLeafValues is false in the BufferedReader, only the non-null values would be read so we'd reach the end of the values before reaching the expected number of rows/levels.

We don't have the same problem for a required int inside an optional group for example as this is detected in GetCompoundReader when typeof(TElement) != typeof(TLogical) and is handled specially with the OptionalReader class.

Copy link
Contributor

@marcin-krystianc marcin-krystianc left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@adamreeve adamreeve merged commit 4deb370 into G-Research:master Aug 13, 2024
35 checks passed
@adamreeve adamreeve deleted the required_string_in_group branch August 13, 2024 19:33
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.

[BUG]: Getting error while reading checkpoint parquet file
2 participants