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

Function row_number_single_partition

nodedb-query/src/window/eval.rs:99–112  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

97
98 #[test]
99 fn row_number_single_partition() {
100 let mut rows = make_rows();
101 let spec = WindowFuncSpec {
102 alias: "rn".into(),
103 func_name: "row_number".into(),
104 args: vec![],
105 partition_by: vec![],
106 order_by: vec![],
107 frame: WindowFrame::default(),
108 };
109 evaluate_window_functions(&mut rows, &[spec]);
110 assert_eq!(rows[0].1["rn"], json!(1));
111 assert_eq!(rows[4].1["rn"], json!(5));
112 }
113
114 #[test]
115 fn row_number_partitioned() {

Callers

nothing calls this directly

Calls 2

make_rowsFunction · 0.85

Tested by

no test coverage detected