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

Function ntile_buckets

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

Source from the content-addressed store, hash-verified

538
539 #[test]
540 fn ntile_buckets() {
541 let mut rows = rows_v(&[1, 2, 3]);
542 let cols = ci(&["v"]);
543 let s = spec(
544 "ntile",
545 vec![SqlExpr::Literal(Value::Integer(2))],
546 vec![],
547 vec![(col("v"), true)],
548 );
549 evaluate_window_functions_value(&mut rows, &cols, &[s]).unwrap();
550 assert_eq!(out_int(&rows, 1), vec![1, 1, 2]);
551 }
552
553 #[test]
554 fn lag_default_and_offset() {

Callers

nothing calls this directly

Calls 4

specFunction · 0.85
rows_vFunction · 0.70
ciFunction · 0.70

Tested by

no test coverage detected