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

Function extract_plain_aggregate

nodedb-sql/src/aggregate_walk.rs:320–326  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

318
319 #[test]
320 fn extract_plain_aggregate() {
321 let aggs =
322 extract_aggregates(&first_expr("SELECT SUM(x) FROM t"), "total", &functions()).unwrap();
323 assert_eq!(aggs.len(), 1);
324 assert_eq!(aggs[0].function, "sum");
325 assert_eq!(aggs[0].alias, "total");
326 }
327
328 #[test]
329 fn extract_aggregate_inside_cast() {

Callers

nothing calls this directly

Calls 3

first_exprFunction · 0.85
functionsFunction · 0.85
extract_aggregatesFunction · 0.70

Tested by

no test coverage detected