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

Thank you for opening a pull request!

Please label the PR with one or more of:

  • bug-fix
  • chore
  • dependencies
  • documentation
  • enhancement

Also, add the 'breaking-change' label if appropriate.

See CONTRIBUTING.md for details.

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.

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

1 participant