(name: string)
| 85 | // returned unchanged; callers must guard with `isKnownEventField` before |
| 86 | // inlining into SQL. |
| 87 | export function normalizeEventField(name: string): string { |
| 88 | if (EVENT_FIELD_ALIASES[name]) { |
| 89 | return EVENT_FIELD_ALIASES[name]!; |
| 90 | } |
| 91 | if (EVENT_UTM_BARE_COLUMNS.has(name)) { |
| 92 | return `properties.__query.${name}`; |
| 93 | } |
| 94 | return name; |
| 95 | } |
| 96 | |
| 97 | // Returns true if `name` resolves to something we can inline into SQL safely: |
| 98 | // a known top-level events column, a properties / profile / group path, a |
no test coverage detected