Skip to content

feat(arrow-avro): HeaderInfo to expose OCF header#9548

Open
mzabaluev wants to merge 3 commits intoapache:mainfrom
mzabaluev:avro-reader-builder-with-header-info
Open

feat(arrow-avro): HeaderInfo to expose OCF header#9548
mzabaluev wants to merge 3 commits intoapache:mainfrom
mzabaluev:avro-reader-builder-with-header-info

Conversation

@mzabaluev
Copy link
Contributor

@mzabaluev mzabaluev commented Mar 13, 2026

Which issue does this PR close?

Rationale for this change

Rework of #9462 along the lines proposed in #9462 (comment).

What changes are included in this PR?

Add HeaderInfo as a cheaply cloneable value to expose header information parsed from an Avro OCF file.

Add read_header_info function to the reader module, and its async counterpart to the reader::async_reader module, to read the header from the file reader and return HeaderInfo.

Add build_with_header method to async reader builder to enable reuse of the header with multiple readers.

Are these changes tested?

Added a test for the async reader.

Are there any user-facing changes?

New API in arrow-avro:

  • reader::HeaderInfo
  • reader::read_header_info and reader::async_reader::read_header_info
  • build_with_header method of AvroAsyncFileReader's builder.

Add HeaderInfo to expose OCF header information such as
the writer schema and sync marker.

Add read_header_info function to the reader module, and
its async counterpart to the reader::async_reader module,
to read the header from the file reader and return HeaderInfo.

Add build_with_header method to async reader builder to enable
reuse of the header with multiple readers.
@github-actions github-actions bot added arrow Changes to the arrow crate arrow-avro arrow-avro crate labels Mar 13, 2026
@mzabaluev mzabaluev changed the title feat(arrow-avro): HeaderInfo to expose OCF header feat(arrow-avro): HeaderInfo to expose OCF header Mar 13, 2026
@mzabaluev mzabaluev marked this pull request as ready for review March 14, 2026 10:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

arrow Changes to the arrow crate arrow-avro arrow-avro crate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Expose Avro writer schema when building the reader

1 participant