Skip to content

GH-55824: [C++][Parquet] Read Bloom filters with non-power-of-two block counts - #55825

Open
zhjwpku wants to merge 1 commit into
apache:mainfrom
zhjwpku:fix/parquet-bloom-filter-block-count
Open

zhjwpku wants to merge 1 commit into
apache:mainfrom
zhjwpku:fix/parquet-bloom-filter-block-count

Conversation

@zhjwpku

@zhjwpku zhjwpku commented Nov 28, 2026

Copy link
Copy Markdown
Member

Rationale for this change

parquet-go can write valid three-block Bloom filters. Arrow rejects their 96-byte bitsets when reading the column filter.

What changes are included in this PR?

Validate that a serialized bitset contains whole 32-byte blocks within the existing size limits. Use the exact on-disk block count for lookups. For nonempty filters, allow folding only while the block count is evenly divisible by two at each step.

Are these changes tested?

A parquet-go fixture exercises deserialization and lookups for all 64 inserted INT32 values across three blocks. A second test folds six blocks to three and checks that every inserted value still matches. The macOS arm64 Debug run of parquet-internals-test passed 376 tests. Eight statistics tests were skipped because Snappy was disabled.

Are there any user-facing changes?

C++ callers can read and query valid Bloom filters with non-power-of-two block counts.

Was AI used for this PR?

The contributor identified the interoperability issue. Codex implemented the fix, generated the fixture with parquet-go, wrote and ran the tests, and drafted the PR description.

PR code and description written by:

  • Human
  • AI

Reviewed before submission by:

  • Human
  • AI
  • Not reviewed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant