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

Function groups_bounds_resolution

nodedb-query/src/window/value_agg.rs:601–616  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

599
600 #[test]
601 fn groups_bounds_resolution() {
602 // Peer groups: [g0, g0, g1, g2]. GROUPS 1 PRECEDING → CURRENT ROW at
603 // pos 2 (group 1) covers groups 0..=1 → indices 0..=1.
604 let peer_groups = vec![0usize, 0, 1, 2];
605 let order = vec![
606 Value::Integer(1),
607 Value::Integer(1),
608 Value::Integer(2),
609 Value::Integer(3),
610 ];
611 let f = frame("groups", FrameBound::Preceding(1), FrameBound::CurrentRow);
612 assert_eq!(
613 evaluate_v_frame_bounds(&f, 2, 4, &order, &peer_groups),
614 (0, 2)
615 );
616 }
617}

Callers

nothing calls this directly

Calls 1

frameFunction · 0.85

Tested by

no test coverage detected