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

   # Which issue does this PR close?
   
   No linked issue.
   
   # Rationale for this change
   
   Writing an empty slice of a nonempty `RunArray` succeeds, but reading the 
resulting IPC batch fails because the writer emits a run end of zero. For 
example, slicing run ends `[2, 5]` and values `[10, 20]` with `slice(2, 0)` 
produces this error. Run ends must be strictly positive.
   
   # What changes are included in this PR?
   
   Normalize empty run arrays to zero-offset arrays with empty run-end and 
value children before calculating physical run indices. Add regression tests 
for Int16, Int32, and Int64 run ends, every legal empty-slice offset in the 
example array, already-empty arrays, and both Stream and File IPC roundtrips.
   
   Implementation and regression tests were generated with OpenAI Codex and 
reviewed and validated with the checks below.
   
   # Are these changes tested?
   
   - Default arrow-ipc library tests: 134 passed.
   - All-features arrow-ipc library tests: 140 passed.
   - New regression tests with `arrow-data/force_validate`: 3 passed.
   - Clippy for arrow-ipc with all targets and all features, with warnings 
denied: passed.
   - Workspace formatting and diff whitespace checks: passed.
   
   The full all-features suite with `arrow-data/force_validate` has six 
failures in existing reader tests that intentionally construct invalid arrays. 
The same six failures were reproduced on the unchanged base commit; all new 
tests pass with forced validation.
   
   # Are there any user-facing changes?
   
   Empty RunArray slices now roundtrip through Stream and File IPC 
successfully. No public API 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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to