Sealdot opened a new pull request, #561:
URL: https://github.com/apache/arrow-js/pull/561

   Closes #557.
   
   The IPC reader never compared the length of a field node with the row count 
of its RecordBatch. A column that declared fewer rows than the batch read with 
no error: `ensureSameLengthData()` made the field nullable and backfilled the 
missing rows with nulls the writer never wrote, so a reader cannot tell them 
from real nulls. Arrow C++ refuses such a column in `RecordBatch::Validate()`.
   
   `_loadRecordBatch()` now throws when a loaded column's length differs from 
`header.length`, before the `RecordBatch` constructor can backfill. This 
applies to both the stream and file readers, and to compressed batches (the 
node list is unchanged by decompression). Dictionary batches and top-level 
batch structure are untouched; nested child vectors may still differ in length 
from the batch, as the format allows.
   
   The regression tests patch one field-node length inside otherwise valid 
streams and files written by the real writers — a column declaring 2 or 0 rows 
in a 4-row batch now raises an error naming the column, while the unmodified 
bytes still read correctly. The open PR #551 validates buffer regions and does 
not cover this fault: the buffers of these streams are unchanged.
   
   All 2,688 IPC tests across 19 suites passed on `main` (`7a34e681`), along 
with the ESNext ESM source typecheck and ESLint on both changed files. A full 
local Jest run was not attempted; on the same machine the suite previously 
reached its 640 MiB Node heap limit. Upstream CI workflows await maintainer 
approval and have not run.
   
   Cognition Devin CLI agent (SWE-2 High) assisted with the implementation, 
tests, and verification.
   


-- 
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]

Reply via email to