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

Function tile

nodedb-array/src/query/aggregate.rs:247–255  ·  view source on GitHub ↗
(rows: &[(i64, Option<f64>)])

Source from the content-addressed store, hash-verified

245 }
246
247 fn tile(rows: &[(i64, Option<f64>)]) -> SparseTile {
248 let s = schema();
249 let mut b = SparseTileBuilder::new(&s);
250 for (k, v) in rows {
251 let cv = v.map(CellValue::Float64).unwrap_or(CellValue::Null);
252 b.push(&[CoordValue::Int64(*k)], &[cv]).unwrap();
253 }
254 b.build()
255 }
256
257 #[test]
258 fn sum_skips_nulls() {

Callers 5

sum_skips_nullsFunction · 0.70
min_max_meanFunction · 0.70

Calls 3

schemaFunction · 0.70
pushMethod · 0.45
buildMethod · 0.45

Tested by 5

sum_skips_nullsFunction · 0.56
min_max_meanFunction · 0.56