Skip to content

Commit 1247fee

Browse files
committed
Switch to indexed serialization
Switch column from sequence to indexed serialization. The difference is that sequence stores data as a sequence of (length, data) and indexed puts all lengths first, followed by all data. We expect this to be more efficient if we do not read all data, or repeatedly borrow its serialized representation. For details, see frankmcsherry/columnar#30 Signed-off-by: Moritz Hoffmann <mh@materialize.com>
1 parent 4c7b52e commit 1247fee

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/timely-util/src/containers.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -547,6 +547,16 @@ mod tests {
547547

548548
#[mz_ore::test]
549549
fn test_column_from_bytes() {
550+
{
551+
let mut column: Column<i32> = Default::default();
552+
column.push_into(1);
553+
column.push_into(2);
554+
column.push_into(3);
555+
let mut data = Vec::new();
556+
column.into_bytes(&mut std::io::Cursor::new(&mut data));
557+
println!("data: {:?}", data);
558+
}
559+
550560
let raw = raw_columnar_bytes();
551561

552562
let buf = vec![0; raw.len() + 8];

0 commit comments

Comments
 (0)