| """Whitelisted operators + aggregation functions for IR validation.""" |
|
|
| ALLOWED_FILTER_OPS = frozenset({ |
| "=", "!=", "<", "<=", ">", ">=", |
| "in", "not_in", "is_null", "is_not_null", |
| "like", "between", |
| }) |
|
|
| ALLOWED_AGG_FNS = frozenset({ |
| "count", "count_distinct", "sum", "avg", "min", "max", |
| }) |
|
|
| LIMIT_HARD_CAP = 10_000 |
|
|
| |
| |
| |
| |
| TYPE_COMPATIBILITY: dict[str, frozenset[str]] = { |
| "int": frozenset({"int", "decimal"}), |
| "decimal": frozenset({"int", "decimal"}), |
| "string": frozenset({"string"}), |
| "datetime": frozenset({"datetime", "date", "string"}), |
| "date": frozenset({"date", "datetime", "string"}), |
| "bool": frozenset({"bool"}), |
| "json": frozenset({"string"}), |
| } |
|
|