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

Method apply_to_validity

nodedb-columnar/src/delete_bitmap.rs:93–99  ·  view source on GitHub ↗

Apply the delete bitmap to a validity vector: set deleted rows to false. `global_offset` is the row index of the first element in `valid` (used when processing a block that starts at a non-zero row).

(&self, valid: &mut [bool], global_offset: u32)

Source from the content-addressed store, hash-verified

91 /// `global_offset` is the row index of the first element in `valid`
92 /// (used when processing a block that starts at a non-zero row).
93 pub fn apply_to_validity(&self, valid: &mut [bool], global_offset: u32) {
94 for (i, v) in valid.iter_mut().enumerate() {
95 if self.inner.contains(global_offset + i as u32) {
96 *v = false;
97 }
98 }
99 }
100
101 /// Serialize the bitmap to bytes for persistence.
102 pub fn to_bytes(&self) -> Result<Vec<u8>, ColumnarError> {

Callers 3

apply_to_validityFunction · 0.80
read_column_implMethod · 0.80

Calls 2

iter_mutMethod · 0.80
containsMethod · 0.45

Tested by 2

apply_to_validityFunction · 0.64