Skip to content

chore: bring fork up to date with apache/arrow-java v19.0.0 release#9

Open
mateusaubin wants to merge 3 commits into
mainfrom
chore/sync-upstream-v19.0.0
Open

chore: bring fork up to date with apache/arrow-java v19.0.0 release#9
mateusaubin wants to merge 3 commits into
mainfrom
chore/sync-upstream-v19.0.0

Conversation

@mateusaubin
Copy link
Copy Markdown
Collaborator

Summary

Merges upstream apache/arrow-java up to commit b410fb26d — the official v19.0.0 release.

Commits brought in

Notes

Test plan

Yicong-Huang and others added 3 commits March 12, 2026 09:39
…ector offset buffer serialization (apache#989)

## What's Changed

Fix `BaseVariableWidthVector`/`BaseLargeVariableWidthVector` IPC
serialization when `valueCount` is 0.

### Problem

When `valueCount == 0`, `setReaderAndWriterIndex()` was setting
`offsetBuffer.writerIndex(0)`, which means `readableBytes() == 0`. IPC
serializer uses `readableBytes()` to determine buffer size, so 0 bytes
were written to the IPC stream. This crashes IPC readers in other
libraries because Arrow spec requires offset buffer to have at least one
entry `[0]`.

This is a follow-up to apache#967 which fixed the same issue in
`ListVector`/`LargeListVector`.

### Fix

Modify `setReaderAndWriterIndex()` to always use `(valueCount + 1) *
OFFSET_WIDTH` for the offset buffer's `writerIndex`, moved outside the
if/else branch. When the offset buffer capacity is insufficient (e.g.,
empty buffer from constructor or loaded via `loadFieldBuffers()`), it
reallocates a properly sized buffer on demand.


### Testing

Added tests for empty `VarCharVector` and `LargeVarCharVector` verifying
offset buffer has correct `readableBytes()` after `setValueCount(0)`.


Closes apache#343

---------

Co-authored-by: Yicong Huang <yicong.huang+data@databricks.com>
Merge upstream apache/arrow-java up to b410fb2 (v19.0.0 release).

Brings in:
- 77df3ec apacheGH-343: Fix BaseVariableWidthVector and BaseLargeVariableWidthVector
- b410fb2 MINOR: Bump version to 19.0.0 (apache#1066)

Version kept at 19.0.0-iomete.1 to preserve fork release line.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants