Check if a function name is an aggregate */
| 3722 | |
| 3723 | /* Check if a function name is an aggregate */ |
| 3724 | static bool is_aggregate_func(const char *func) { |
| 3725 | return func && |
| 3726 | (strcmp(func, "COUNT") == 0 || strcmp(func, "SUM") == 0 || strcmp(func, "AVG") == 0 || |
| 3727 | strcmp(func, "MIN") == 0 || strcmp(func, "MAX") == 0 || strcmp(func, "COLLECT") == 0); |
| 3728 | } |
| 3729 | |
| 3730 | /* Append `val` to a string list only if not already present — i.e. maintain a |
| 3731 | * set of distinct values. Used by COUNT(DISTINCT x) (#239). */ |
no outgoing calls
no test coverage detected