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

docs: add sizing explanation to bloom filter docs in parquet #5705

Merged
merged 4 commits into from
May 4, 2024

Conversation

hiltontj
Copy link
Contributor

@hiltontj hiltontj commented May 1, 2024

Added documentation detailing the sizing of bloom filters in the parquet crate.

Which issue does this PR close?

There is currently no issue for this change.

Rationale for this change

There is a storage penalty for using bloom filters in parquet, so I felt having the explanation of how they are sized, based on the chosen FPP and NDV parameters, would be helpful to users.

What changes are included in this PR?

This only includes documentation changes to the bloom_filter module within the parquet crate.

Are there any user-facing changes?

This is a documentation change, so will be user-facing.

Added documentation detailing the sizing of bloom filters in the parquet
crate.
@github-actions github-actions bot added the parquet Changes to the parquet crate label May 1, 2024
Comment on lines +45 to +49
//! ```text
//! b = NP2(m/8) / 32
//! ```
//!
//! Where, `NP2` denotes *the next power of two*, and `m` is divided by 8 to be represented as bytes.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

There may be a more idiomatic way of expressing the next power of two as a function than NP2.

Copy link
Contributor

Choose a reason for hiding this comment

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

🤷 I don't know of one off the top of my head

@hiltontj
Copy link
Contributor Author

hiltontj commented May 2, 2024

Looks like Clippy is unhappy after 1.78. I will likely wait for that to get fixed upstream and then merge/rebase.

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 @hiltontj -- I pulled it down a rendered it -- looks really nice @hiltontj

I had a one small correction but otherwise I think this is ready to 🚀

Screenshot 2024-05-02 at 3 39 42 PM

parquet/src/bloom_filter/mod.rs Outdated Show resolved Hide resolved
Comment on lines +45 to +49
//! ```text
//! b = NP2(m/8) / 32
//! ```
//!
//! Where, `NP2` denotes *the next power of two*, and `m` is divided by 8 to be represented as bytes.
Copy link
Contributor

Choose a reason for hiding this comment

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

🤷 I don't know of one off the top of my head

@alamb
Copy link
Contributor

alamb commented May 2, 2024

I believe the clippy failure is unrelated (it is due to the new version of rust, nothing in this PR)

@alamb alamb added the documentation Improvements or additions to documentation label May 2, 2024
Updated the bloom filter module doc comment to clarify that the metadata stores the offset/length of the bloom filter, and not the bloom filter in its entirety.

Co-authored-by: Andrew Lamb <[email protected]>
@alamb
Copy link
Contributor

alamb commented May 2, 2024

PR to fix clippy is here: #5710

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.

Looks great to me -- thanks again @hiltontj

@alamb
Copy link
Contributor

alamb commented May 4, 2024

I merged up from main to get the clippy fixes

The archery integration test failure does not appear to be related: #5719

@alamb alamb merged commit 2bdc9c1 into apache:master May 4, 2024
16 checks passed
@alamb
Copy link
Contributor

alamb commented May 4, 2024

Thanks again @hiltontj !

@hiltontj
Copy link
Contributor Author

hiltontj commented May 4, 2024

Thanks for closing it out @alamb!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation parquet Changes to the parquet crate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants