CurtHagenlocher opened a new pull request, #465:
URL: https://github.com/apache/arrow-dotnet/pull/465

   ## What's Changed
   
   A zero-length `string`, `binary`, `large_string` or `large_binary` array may 
have an empty (0-byte) offsets buffer. Arrow C++ accepts this, and both its IPC 
writer and nanoarrow's emit it. `ArrowStreamReader` reads such arrays fine, but 
`ArrowArrayConcatenator.Concatenate` threw `ArgumentOutOfRangeException`: 
`ConcatenateVariableBinaryValueBuffer()` and 
`ConcatenateLargeVariableBinaryValueBuffer()` sliced `Length + 1` offsets from 
every input.
   
   Both loops in each of these functions now skip zero-length inputs, as the 
offset buffer and list paths already do. A zero-length input contributes no 
value bytes.
   
   ### Tests
   `TestConcatenateVariableBinaryWithEmptyOffsetsBuffer` covers all four types, 
with empty-offset inputs at the start, middle and end of the list (mixed with 
inputs that contain nulls), and a case where every input is empty. Without the 
fix it fails for all four types with the exception from the issue.
   
   Closes #462.
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   
   Co-Authored-By: Claude Opus 5.5 <[email protected]>
   


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