gty404 opened a new pull request, #1054: URL: https://github.com/apache/iceberg-cpp/pull/1054
## Summary - nanoarrow FULL validation only requires a struct's children to be at least as long as the parent struct, but `ParseManifestList`, `ParseDataFile`, and `ParseManifestEntry` index containers that are pre-sized to the parent's row count using each child's own `length`. A spec-legal batch with a longer child drives those loops past the end of the output vector. - Add `AssertChildrenLength`, which asserts every child of a struct view has exactly the same length as the parent, and call it everywhere a struct's children feed a parent-sized container. - The `kPartitionFieldId` case in `ParseDataFile` previously validated the partition struct's type with a bare `AssertViewType` (no children-count check at all); it now uses `AssertViewTypeAndChildren` plus the new length check, matching the other call sites. ## Test plan - [x] Added `AssertChildrenLengthTest.RejectsChildLongerThanParent` in `manifest_reader_test.cc`, hand-building an Arrow `StructArray` whose declared length is shorter than its child's actual length (legal under nanoarrow FULL validation) and asserting `InvalidArgument`. - [x] Confirmed the new test fails without the fix (temporarily neutered `AssertChildrenLength` to a no-op) and passes with it restored. - [x] Ran the full `manifest_test` suite: 227 passed, 0 failed. -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
