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

Function extract_aggregate_inside_case

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

Source from the content-addressed store, hash-verified

339
340 #[test]
341 fn extract_aggregate_inside_case() {
342 let aggs = extract_aggregates(
343 &first_expr("SELECT CASE WHEN x > 0 THEN SUM(y) ELSE 0 END FROM t"),
344 "r",
345 &functions(),
346 )
347 .unwrap();
348 assert_eq!(aggs.len(), 1);
349 assert_eq!(aggs[0].function, "sum");
350 }
351
352 #[test]
353 fn extract_aggregate_inside_coalesce() {

Callers

nothing calls this directly

Calls 3

first_exprFunction · 0.85
functionsFunction · 0.85
extract_aggregatesFunction · 0.70

Tested by

no test coverage detected