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

Function result_valid_len

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

Get the current length of the validity vector in a DecodedColumn.

(result: &DecodedColumn)

Source from the content-addressed store, hash-verified

123
124/// Get the current length of the validity vector in a DecodedColumn.
125pub(super) fn result_valid_len(result: &DecodedColumn) -> usize {
126 match result {
127 DecodedColumn::Int64 { valid, .. }
128 | DecodedColumn::Float64 { valid, .. }
129 | DecodedColumn::Timestamp { valid, .. }
130 | DecodedColumn::Bool { valid, .. }
131 | DecodedColumn::Binary { valid, .. }
132 | DecodedColumn::DictEncoded { valid, .. } => valid.len(),
133 }
134}
135
136/// Get a mutable slice of the validity vector starting from `offset`.
137pub(super) fn result_valid_slice_mut(result: &mut DecodedColumn, offset: usize) -> &mut [bool] {

Callers 1

read_column_implMethod · 0.85

Calls 1

lenMethod · 0.45

Tested by

no test coverage detected