You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "mzabaluev (via GitHub)" <gi...@apache.org> on 2026/03/13 00:43:14 UTC

[PR] feat(arrow-avro): HeaderInfo to expose OCF header [arrow-rs]

mzabaluev opened a new pull request, #9548:
URL: https://github.com/apache/arrow-rs/pull/9548

   # Which issue does this PR close?
   
   - Closes #9460.
   
   # Rationale for this change
   
   Rework of #9462 along the lines proposed in https://github.com/apache/arrow-rs/pull/9462#issuecomment-3995541243.
   
   # 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?
   
   TBA
   
   # Are there any user-facing changes?
   
   New API:
   
   * `reader::HeaderInfo`
   * `reader::read_header_info` and `reader::async_reader::read_header_info`
   *  `build_with_header` method of `AvroAsyncFileReader`'s builder.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat(arrow-avro): `HeaderInfo` to expose OCF header [arrow-rs]

Posted by "mzabaluev (via GitHub)" <gi...@apache.org>.
mzabaluev commented on PR #9548:
URL: https://github.com/apache/arrow-rs/pull/9548#issuecomment-4066286913

   I have not added a method to the sync reader builder yet, because I have some doubts about the API. The implementation uses the sequential `BufRead`, which means that the header length information is not useful: the only supported case is to read the header from the same `BufRead` object first, making sure that the read position is immediately after the header.
   
   When some seeking capabilities are added to the sync reader to work with ranges, this may need to be revisited.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org