fix(datagen): align random primitive buffers - #8776
Conversation
There was a problem hiding this comment.
✅ Gate recommendation: approve.
The change fixes the reported alignment failure at the allocation boundary: Arrow-managed mutable storage supplies aligned pointers for both empty and populated buffers while preserving the generator’s existing byte and declared-type semantics.
|
Blocked: The Ready PR remains blocked by two unrelated current-head CI failures. Remote head Smallest next action: re-run the two failed jobs on this head. Alternatively, investigate and fix the independent vector-index flakes separately if either reproduces consistently, then re-run this PR. |
There was a problem hiding this comment.
✅ Gate recommendation: approve.
The merge from current main leaves the reviewed patch unchanged. Arrow-managed mutable storage still fixes the alignment contract for both empty and populated buffers while preserving generated bytes and declared types.
Summary
Root cause
RandomBytesGenerator filled a Vec and reinterpreted it as wider Arrow native values. Vec only guarantees byte alignment, and its empty dangling pointer is deterministically misaligned for these types.
Fix
Use Arrow MutableBuffer storage, which remains cache-line aligned for both empty and allocated buffers, before constructing the typed ScalarBuffer.
Validation
Fixes #7911