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

Function min_max

nodedb-query/src/msgpack_scan/aggregate.rs:478–488  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

476
477 #[test]
478 fn min_max() {
479 let d1 = encode(&json!({"v": 5}));
480 let d2 = encode(&json!({"v": 1}));
481 let d3 = encode(&json!({"v": 9}));
482 let docs: Vec<&[u8]> = vec![&d1, &d2, &d3];
483
484 let min = compute_aggregate_binary("min", "v", None, &docs);
485 let max = compute_aggregate_binary("max", "v", None, &docs);
486 assert_eq!(min, Value::Integer(1));
487 assert_eq!(max, Value::Integer(9));
488 }
489
490 #[test]
491 fn count_distinct() {

Callers

nothing calls this directly

Calls 2

compute_aggregate_binaryFunction · 0.85
encodeFunction · 0.70

Tested by

no test coverage detected