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

   # Which issue does this PR close?
   
   - Part of #10245.
   
   # Rationale for this change
   
   The remaining Arrow Avro decoder callsites store `OffsetBufferBuilder<i32>` 
as long-lived state. Replacing them with `Vec<i32>` reduces builder overhead 
and allows byte-array offsets to be derived directly from the values buffer 
length.
   
   # What changes are included in this PR?
   
   The `Binary`, `String`, `StringView`, `Array`, and `Map` decoder variants 
now store offsets in `Vec<i32>`.
   
   Small helpers initialize, append, and flush the offset vectors while 
preserving overflow checks and offset invariants. Null runs use `Vec::resize` 
to append repeated offsets efficiently.
   
   # Are these changes tested?
   
   Yes:
   
   - `cargo fmt --all -- --check`
   - `cargo test -p arrow-avro` — 410 unit tests and 25 doc tests passed
   - `cargo clippy -p arrow-avro --all-targets -- -D warnings`
   
   Criterion results for 10,000 rows:
   
   | Decoder | Batch size | Change |
   | --- | ---: | ---: |
   | Binary | 4,096 | 46% faster |
   | Binary | 65,536 | 3% faster |
   | Map | 4,096 | 47% faster |
   | Map | 65,536 | 41% faster |
   | String | Both | No significant change |
   | Array | Both | No significant change |
   
   # Are there any user-facing changes?
   
   No.
   
   # AI assistance
   
   Codex was used to prepare the refactor, run tests and benchmarks, and draft 
this description.
   


-- 
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]

Reply via email to