MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / write_columnar_segment

Function write_columnar_segment

nodedb/tests/corruption_quarantine.rs:40–48  ·  view source on GitHub ↗

Produce a valid sealed columnar segment with one row.

()

Source from the content-addressed store, hash-verified

38
39/// Produce a valid sealed columnar segment with one row.
40fn write_columnar_segment() -> Vec<u8> {
41 let schema = minimal_columnar_schema();
42 let mut mem = ColumnarMemtable::new(&schema);
43 mem.append_row(&[Value::Integer(42)]).expect("append row");
44
45 SegmentWriter::plain()
46 .write_segment(&schema, mem.columns(), mem.row_count(), None)
47 .expect("write segment")
48}
49
50/// Produce a valid FTS segment with one term.
51fn write_fts_segment() -> Vec<u8> {

Calls 6

minimal_columnar_schemaFunction · 0.85
append_rowMethod · 0.80
expectMethod · 0.45
write_segmentMethod · 0.45
columnsMethod · 0.45
row_countMethod · 0.45

Tested by

no test coverage detected