Commit 7110ff6
feat: add conditional, string, math, date/time, and JSON scalar functions
Adds 48 new projection functions across five categories:
- Conditional: NULLIF, GREATEST, LEAST, IF
- String: CHAR_LENGTH, LEFT, RIGHT, REPLACE, LPAD, RPAD, REPEAT,
REVERSE, LOCATE, INSTR, SPACE, STRCMP
- Math: SQRT, LOG, LOG2, LOG10, EXP, SIN, COS, TAN, DEGREES,
RADIANS, SIGN, TRUNCATE, PI
- Date/Time: HOUR, MINUTE, SECOND, MICROSECOND, QUARTER, WEEK,
WEEKDAY, DAYOFWEEK, DAYOFYEAR, DAYNAME, MONTHNAME, LAST_DAY,
STR_TO_DATE, FROM_UNIXTIME, UNIX_TIMESTAMP, CONVERT_TZ, CURTIME,
UTC_TIMESTAMP, ADDTIME, SUBTIME, TIMEDIFF
- JSON: JSON_EXTRACT, JSON_OBJECT, JSON_ARRAY, JSON_CONTAINS,
JSON_LENGTH, JSON_UNQUOTE
Each function follows the existing _of<> tag + projection_traits +
short alias pattern. Fixed-string template parameters are used for
compile-time string literals (format strings, JSON paths, timezone
names, search substrings). 48 new unit tests added (4 new suites).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent 42c1414 commit 7110ff6
3 files changed
Lines changed: 1235 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
28 | 33 | | |
29 | 34 | | |
30 | 35 | | |
| |||
0 commit comments