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

Write null counts in Parquet statistics when they are known #6490

Merged
merged 6 commits into from
Oct 1, 2024

Conversation

etseidl
Copy link
Contributor

@etseidl etseidl commented Oct 1, 2024

Which issue does this PR close?

Part of #6256

Rationale for this change

Write 0 for null counts in Statistics when they are known, matching behavior of other major Parquet implementations.

What changes are included in this PR?

This PR consists of @alamb's changes to to_thrift for Statistics from #6257, leaving changes to from_thrift for later (as these changes will be breaking).

Are there any user-facing changes?

No API changes, but written files will now have Some(0) for null_count when the count is known to be 0. This increases file sizes by up to 2 bytes per Statistics object.

@github-actions github-actions bot added the parquet Changes to the parquet crate label Oct 1, 2024
Copy link
Contributor

@alamb alamb left a comment

Choose a reason for hiding this comment

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

Thank you again @etseidl -- very much appreciated

BTW I think you may be in the bay area -- I am going to be speaking at UC Berkeley in Dec. Feel free to drop me an email at [email protected] if you are interested in meeting face to face.

@@ -1052,4 +1053,92 @@ mod tests {
true,
));
}

#[test]
Copy link
Contributor

Choose a reason for hiding this comment

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

👏 for thorough test coverage

@alamb alamb merged commit bea9daa into apache:master Oct 1, 2024
16 checks passed
@etseidl etseidl deleted the write_null_counts branch October 2, 2024 18:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
parquet Changes to the parquet crate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants