jecsand838 commented on code in PR #8006: URL: https://github.com/apache/arrow-rs/pull/8006#discussion_r2244016597
########## arrow-avro/src/reader/mod.rs: ########## @@ -246,8 +252,8 @@ impl Decoder { self.prepare_schema_switch(new_fp)?; // If there are already decoded rows, we must flush them first. // Forcing the batch to be full ensures `flush` is called next. - if self.decoded_rows > 0 { - self.decoded_rows = self.batch_size; + if self.remaining_capacity < self.batch_size { Review Comment: @scovich That was the intention. Not sure how common this scenario is in the real world, however with single object encoding you can legally receive two different schema fingerprints back to back before any rows are decoded. Also I'll update the comment on L254 to better the reflect the changes. -- 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-unsubscr...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org