Skip to content

Conversation

@RoseZhang123
Copy link

Which issue does this PR close?

Rationale for this change

Explained in the issue #8727 .

What changes are included in this PR?

Make the following method signatures public:

pub(crate) fn new(bitset: &[u8]) -> Self;
pub(crate) fn write<W: Write>(&self, mut writer: W) -> Result<(), ParquetError>

Are these changes tested?

Added unit tests for them.

Are there any user-facing changes?

Users is now able to deserialize SBBFs straight from storage and re-serialize them form raw bytes.

@github-actions github-actions bot added the parquet Changes to the parquet crate label Oct 31, 2025
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 @RoseZhang123 -- this is a very nice contribution

I think we need a doc example to serve as documentation and illustration of the usecase, but otherwise this is great

}

pub(crate) fn new(bitset: &[u8]) -> Self {
/// Create a new [Sbbf] from raw bitset bytes.
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you please add a doc example here showing how to use this API with your intended usecase?

That will both help the documentation and ensure we have exposed enough of the API to be useful

For example, if the idea is to save a SBFF using write and then re-create it again, an exmaple that:

  1. made a Sbbf (ideally read it from a file)
  2. wrote it to a Vec<>
  3. Created a new Sbbf from that vec
  4. Show that it is the same as the original

it would be nice to mention that a correct argument for creating a sbff can be created using Sbff::write

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.

Make Parquet SBBF serialize/deserialize helpers public for external reuse

2 participants