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

Function empty_decoded

nodedb-columnar/src/reader/block_decode.rs:61–82  ·  view source on GitHub ↗

Create an empty DecodedColumn for the given kind.

(kind: &ColumnKind)

Source from the content-addressed store, hash-verified

59
60/// Create an empty DecodedColumn for the given kind.
61pub(super) fn empty_decoded(kind: &ColumnKind) -> DecodedColumn {
62 match kind {
63 ColumnKind::Int64 => DecodedColumn::Int64 {
64 values: Vec::new(),
65 valid: Vec::new(),
66 },
67 ColumnKind::Float64 => DecodedColumn::Float64 {
68 values: Vec::new(),
69 valid: Vec::new(),
70 },
71 ColumnKind::VarLen | ColumnKind::Binary => DecodedColumn::Binary {
72 data: Vec::new(),
73 offsets: Vec::new(),
74 valid: Vec::new(),
75 },
76 ColumnKind::DictEncoded => DecodedColumn::DictEncoded {
77 ids: Vec::new(),
78 dictionary: Vec::new(), // Populated during decode_block.
79 valid: Vec::new(),
80 },
81 }
82}
83
84/// Append null-fill rows for a skipped block.
85pub(super) fn append_null_fill(result: &mut DecodedColumn, row_count: usize) {

Callers 1

read_column_implMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected