Skip to content

Conversation

@Yicong-Huang
Copy link

What's Changed

Fix offset buffer not allocated for nested empty ListVector/LargeListVector during IPC serialization.

When outer array is empty, nested writers are never invoked, so child list's offset buffer remains unallocated (capacity = 0). This violates Arrow spec which requires offset[0] = 0.

Fix

Apply the same fix to getFieldBuffers() as in exportCDataBuffers(): allocate offset buffer if capacity == 0.

Testing

Added tests for nested empty lists verifying offset buffer allocation and offset[0] = 0.

Closes #343.

@Yicong-Huang Yicong-Huang changed the title GH-343 Fix ListVector offset buffer not allocated for nested empty arrays GH-343: Fix ListVector offset buffer not allocated for nested empty arrays Jan 17, 2026
@github-actions

This comment has been minimized.

@lidavidm lidavidm added the bug-fix PRs that fix a big. label Jan 18, 2026
@github-actions github-actions bot added this to the 19.0.0 milestone Jan 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug-fix PRs that fix a big.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[C++/Java] Error when reading inner lists within a struct in empty outer lists from C++/Python in Java

2 participants