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

Function ceiling_x_values

nodedb-array/src/query/retention.rs:411–422  ·  view source on GitHub ↗

Collect coord x-values from a SparseTile (single-dim schema).

(tile: &SparseTile)

Source from the content-addressed store, hash-verified

409
410 /// Collect coord x-values from a SparseTile (single-dim schema).
411 fn ceiling_x_values(tile: &SparseTile) -> Vec<i64> {
412 let rows = decode_sparse_rows(tile).unwrap();
413 let mut xs: Vec<i64> = rows
414 .iter()
415 .map(|r| match r.coord[0] {
416 CoordValue::Int64(x) => x,
417 _ => panic!("unexpected coord type"),
418 })
419 .collect();
420 xs.sort_unstable();
421 xs
422 }
423
424 /// Collect RowKinds from ceiling tile rows, keyed by coord.
425 fn ceiling_kinds(tile: &SparseTile) -> HashMap<i64, RowKind> {

Calls 3

decode_sparse_rowsFunction · 0.85
collectMethod · 0.80
iterMethod · 0.45