Skip to content

feat(parquet): provide direct access to dictionary pages#10420

Open
DarkWanderer wants to merge 1 commit into
apache:mainfrom
DarkWanderer:get-dictionary
Open

feat(parquet): provide direct access to dictionary pages#10420
DarkWanderer wants to merge 1 commit into
apache:mainfrom
DarkWanderer:get-dictionary

Conversation

@DarkWanderer

@DarkWanderer DarkWanderer commented Jul 23, 2026

Copy link
Copy Markdown

Which issue does this PR close?

Rationale for this change

This change provides low-level API necessary for enabling dictionary-based pruning in DataFusion: apache/datafusion#23851

What changes are included in this PR?

  • parquet::file::metadata::dictionary::decode_dictionary_page: decodes
    a BYTE_ARRAY dictionary page (Thrift header parse, decompress, PLAIN
    decode) into a Utf8/Binary Arrow array.
  • ParquetMetaDataReader::read_column_dictionary (sync) and
    read_column_dictionary_async (async) to fetch and decode a given row group/column's dictionary page from a ParquetMetaData, returning Ok(None) if the chunk has no dictionary page.
  • ParquetRecordBatchStreamBuilder::get_row_group_column_dictionary convenience method mirroring get_row_group_column_bloom_filter.

Are these changes tested?

Yes: a round-trip unit test for a dictionary-encoded string column, a
non-BYTE_ARRAY rejection test, and sync + async reader tests that
decode a real dictionary page written through ArrowWriter.

Are there any user-facing changes?

Yes, three new public APIs (see above). No changes to
existing API.

@github-actions github-actions Bot added the parquet Changes to the parquet crate label Jul 23, 2026
@DarkWanderer DarkWanderer changed the title feat(parquet): decode dictionary pages independent of the array reader feat(parquet): provide direct access to dictionary pages Jul 23, 2026
Add sync and async APIs for decoding a BYTE_ARRAY column chunk dictionary page without materializing the full column, enabling exact row-group membership pruning for fully dictionary-encoded chunks.

Reuse the regular page reader header, size validation, and decryption path so standalone dictionary decoding handles encrypted, truncated, and malformed pages safely.

See apache#9010.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@DarkWanderer
DarkWanderer marked this pull request as ready for review July 24, 2026 08:22
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.

Enable access to column dictionaries in async reader

1 participant