Check if a function name is an aggregate */
| 3395 | |
| 3396 | /* Check if a function name is an aggregate */ |
| 3397 | static bool is_aggregate_func(const char *func) { |
| 3398 | return func && |
| 3399 | (strcmp(func, "COUNT") == 0 || strcmp(func, "SUM") == 0 || strcmp(func, "AVG") == 0 || |
| 3400 | strcmp(func, "MIN") == 0 || strcmp(func, "MAX") == 0 || strcmp(func, "COLLECT") == 0); |
| 3401 | } |
| 3402 | |
| 3403 | /* Append `val` to a string list only if not already present — i.e. maintain a |
| 3404 | * set of distinct values. Used by COUNT(DISTINCT x) (#239). */ |
no outgoing calls
no test coverage detected