qroissant/crates/qroissant-core/src
CamZalewski f24af467ec fix: align typed column buffers to T in decode paths
cast_slice::<u8, T> panics with TargetAlignmentGreaterAndInputNotAligned
on KDB IPC payloads where a variable-length column leaves a numeric
column at a misaligned wire offset. The sync decode path's alignment
fallback used Bytes::copy_from_slice (Vec<u8> layout, align=1), which
only happens to work because most allocators over-align byte blocks --
not guaranteed by Rust's allocator API. The async pipelined path went
through read_bytes(len * size) directly, with no alignment branch at
all, and panicked in arrow projection's as_*_slice on Windows release
builds under AsyncPool.query.

Both paths now back typed columns with Vec<T> (Layout::array::<T>
guarantees align_of::<T>()), exposed as bytes::Bytes via a new
AlignedTBuf<T> AsRef<[u8]> owner passed to Bytes::from_owner. Sync
fallback uses the same wrapper. Pipelined typed reads route through
a new read_typed_bytes::<T> helper that swaps in for every typed
Primitive arm in decode_vector_async.

Regression test in pipelined::tests constructs a table with an odd-
length symbol column followed by Long, exercising the previously
panicking path.
2026-05-20 14:13:41 +01:00
..
decode.rs fix: align typed column buffers to T in decode paths 2026-05-20 14:13:41 +01:00
encode.rs Vendor qroissant 0.3.0 baseline 2026-05-20 14:11:30 +01:00
error.rs Vendor qroissant 0.3.0 baseline 2026-05-20 14:11:30 +01:00
extent.rs Vendor qroissant 0.3.0 baseline 2026-05-20 14:11:30 +01:00
frame.rs Vendor qroissant 0.3.0 baseline 2026-05-20 14:11:30 +01:00
lib.rs Vendor qroissant 0.3.0 baseline 2026-05-20 14:11:30 +01:00
pipelined.rs fix: align typed column buffers to T in decode paths 2026-05-20 14:13:41 +01:00
protocol.rs Vendor qroissant 0.3.0 baseline 2026-05-20 14:11:30 +01:00
value.rs Vendor qroissant 0.3.0 baseline 2026-05-20 14:11:30 +01:00