jecsand838 commented on code in PR #9462:
URL: https://github.com/apache/arrow-rs/pull/9462#discussion_r2880711286
##########
arrow-avro/src/reader/async_reader/builder.rs:
##########
@@ -109,8 +109,18 @@ impl<R> ReaderBuilder<R> {
}
}
-impl<R: AsyncFileReader> ReaderBuilder<R> {
- async fn read_header(&mut self) -> Result<(Header, u64), AvroError> {
+impl<R> ReaderBuilder<R>
Review Comment:
> I wonder, do we want to allow maybe a with_header function as well? that
will accept a user's header directly?
Per the [Avro
Spec](https://avro.apache.org/docs/1.11.1/specification/#object-container-files)
regarding OCF:
> A file has a schema, and all objects stored in the file must be written
according to that schema, using binary encoding.
Wouldn't allowing the caller to inject a `Header` outside of this contract
risk inconsistency between the supplied header and actual file contents?
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]