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

Function lead_boundary

nodedb-query/src/window/value_eval.rs:566–575  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

564
565 #[test]
566 fn lead_boundary() {
567 let mut rows = rows_v(&[1, 2, 3]);
568 let cols = ci(&["v"]);
569 let s = spec("lead", vec![col("v")], vec![], vec![(col("v"), true)]);
570 evaluate_window_functions_value(&mut rows, &cols, &[s]).unwrap();
571 assert_eq!(rows[0][1].as_f64().unwrap() as i64, 2);
572 assert_eq!(rows[1][1].as_f64().unwrap() as i64, 3);
573 // Last row has no successor → Null.
574 assert!(matches!(rows[2][1], Value::Null));
575 }
576
577 #[test]
578 fn percent_rank_and_cume_dist() {

Callers

nothing calls this directly

Calls 4

specFunction · 0.85
rows_vFunction · 0.70
ciFunction · 0.70

Tested by

no test coverage detected