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

Function partition_resets_row_number

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

Source from the content-addressed store, hash-verified

597
598 #[test]
599 fn partition_resets_row_number() {
600 let cols = ci(&["g", "v"]);
601 let mut rows = vec![
602 vec![Value::Integer(1), Value::Integer(100)],
603 vec![Value::Integer(1), Value::Integer(101)],
604 vec![Value::Integer(2), Value::Integer(102)],
605 ];
606 let s = spec("row_number", vec![], vec![col("g")], vec![]);
607 evaluate_window_functions_value(&mut rows, &cols, &[s]).unwrap();
608 // Two rows in partition g=1 → 1,2; one row in g=2 → 1. Result at idx 2.
609 assert_eq!(out_int(&rows, 2), vec![1, 2, 1]);
610 }
611
612 #[test]
613 fn unknown_function_errors() {

Callers

nothing calls this directly

Calls 3

specFunction · 0.85
ciFunction · 0.70

Tested by

no test coverage detected