AlonSpivack opened a new pull request, #392: URL: https://github.com/apache/arrow-js/pull/392
## Summary When a Bool column is fully null (`nullCount >= length`), `assembleBoolVector` in `VectorAssembler` previously returned early without writing a values buffer, producing an IPC stream with 0 bytes for buffer `#1` . This violates the Arrow IPC specification, which requires a data buffer of `ceil(length / 8)` bytes for Bool arrays regardless of null count. Other implementations (PyArrow, arrow-rs) reject these streams with: > Buffer `#1` too small in array of type Bool. Expected at least 1 byte(s), got 0 ## Fix Write a zero-filled `Uint8Array` of the correct byte length `((data.length + 7) >> 3)` when all values are null, instead of returning early with no buffer. ## Tests Added 4 round-trip tests for fully-null Bool columns through `tableToIPC` / `tableFromIPC`: - Single-row fully-null Bool - 2-row fully-null Bool (file format) - 10-row fully-null Bool (crosses byte boundary) - Mixed table with normal Int32 + fully-null Bool columns Closes #68 cc @trxcllnt @domoritz -- 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]
