()
| 552 | |
| 553 | #[test] |
| 554 | fn lag_default_and_offset() { |
| 555 | let mut rows = rows_v(&[1, 2, 3]); |
| 556 | let cols = ci(&["v"]); |
| 557 | let s = spec("lag", vec![col("v")], vec![], vec![(col("v"), true)]); |
| 558 | evaluate_window_functions_value(&mut rows, &cols, &[s]).unwrap(); |
| 559 | // First row has no predecessor → Null; rest carry the prior value. |
| 560 | assert!(matches!(rows[0][1], Value::Null)); |
| 561 | assert_eq!(rows[1][1].as_f64().unwrap() as i64, 1); |
| 562 | assert_eq!(rows[2][1].as_f64().unwrap() as i64, 2); |
| 563 | } |
| 564 | |
| 565 | #[test] |
| 566 | fn lead_boundary() { |
nothing calls this directly
no test coverage detected