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

   ### Why
   `ObjectBuilder` updates its field-offset map before appending a value. With 
duplicate-key validation enabled, rejecting a duplicate can leave the map 
changed. With validation disabled, a failed fallible overwrite truncates bytes 
but the old offset is not restored. Continuing to build the object can then 
produce an invalid value.
   
   ### Change
   Use one `IndexMap::entry` lookup to reject validated duplicates before 
mutation and remember a permitted overwrite's previous offset for rollback. Add 
regression tests that continue building after each error. This is independent 
of the fallible trait API in #11106; it is the unique correction extracted from 
superseded #11401.
   
   ### Validation
   - `cargo +1.98.1 test -p parquet-variant --lib`: 176 passed.
   - Formatting and `cargo +1.98.1 clippy -p parquet-variant --lib` pass 
(installed 1.98.1 reports the repo's newer lint as unknown).
   - Quick Criterion baseline vs patch: `bench_object_same_schema` 18.82 ms vs 
18.76 ms; `bench_object_list_same_schema` 12.52 ms vs 12.37 ms. These short 
measurements show no detected regression, not a throughput claim.
   - Independent read-only review covered correctness, regressions, 
performance, API compatibility, and tests; approved with no blockers.


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