Skip to content

[Javascript] tableToIPC has off-by-one errors in the generated IPC byte length #14791

@aarashy

Description

@aarashy

Describe the bug, including details regarding any error messages, version, and platform.

Hello, I filed an issue with arrow-rs because panics were being triggered in their IPC byte parsing functions.
apache/arrow-rs#3215 (comment)

The input IPC bytes were the result of tableToIPC. According to the info I've gathered in my other issue, it seems like tableToIPC is not correctly padding and instead incorrectly truncating bits in cases where the length of a record batch is not divisible by 8.

For example, the Null Bit Buffer encodes whether each row is null or not using 1 bit. My record batch has length 518, which is not divisible by 8 (64.75). Some parsing/validation inside arrow-rs is therefore expecting the null bit buffer to be 65 bytes long, but it's only 64 bytes long.

Component(s)

Format, Integration, JavaScript

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions