Check if an expression is an aggregate function
(&self, expr: &Expression)
| 5939 | |
| 5940 | /// Check if an expression is an aggregate function |
| 5941 | fn is_aggregate_function(&self, expr: &Expression) -> bool { |
| 5942 | match expr { |
| 5943 | Expression::FunctionCall(func_call) => { |
| 5944 | matches!( |
| 5945 | func_call.name.to_uppercase().as_str(), |
| 5946 | "COUNT" | "SUM" | "AVG" | "AVERAGE" | "MIN" | "MAX" | "COLLECT" |
| 5947 | ) |
| 5948 | } |
| 5949 | _ => false, |
| 5950 | } |
| 5951 | } |
| 5952 | |
| 5953 | /// Execute projection with mixed aggregate and non-aggregate expressions |
| 5954 | /// Returns one row per input row with aggregates evaluated per row (typically COUNT=1) |