|
| 1 | +# Changelog |
| 2 | + |
| 3 | +## [0.2.0] - 2026-03-31 |
| 4 | + |
| 5 | +### Added |
| 6 | + |
| 7 | +**Generator (MaxCompute SQL output)** |
| 8 | + |
| 9 | +- `DATEADD` / `DATEADD` with negated delta for `DateSub` (e.g. BigQuery `DATE_SUB` → `DATEADD(dt, -3, 'DAY')`) |
| 10 | +- `DATEDIFF` with optional unit argument |
| 11 | +- `DATETRUNC` / `TRUNC_TIME` with full week-unit support (`'week'` → `'week(monday)'`) |
| 12 | +- `DATEPART` via named `extract_sql` method |
| 13 | +- `GETDATE()` for `CurrentTimestamp`, `NOW()` for `CurrentDatetime` |
| 14 | +- `TOLOWER` / `TOUPPER` for `Lower` / `Upper` |
| 15 | +- `FROM_JSON` for `ParseJSON`, `GET_USER_ID()` for `CurrentUser`, `TO_MILLIS` for `UnixMillis` |
| 16 | +- `APPROX_DISTINCT`, `ARG_MAX`, `ARG_MIN` |
| 17 | +- `WM_CONCAT(sep, col)` via named `groupconcat_sql` method (with default separator guard) |
| 18 | +- `TO_CHAR` via named `tochar_sql` method |
| 19 | +- Type mapping: `VARCHAR` / `CHAR` / `TEXT` → `STRING`; `DATETIME` preserved |
| 20 | + |
| 21 | +**Parser (read direction)** |
| 22 | + |
| 23 | +- Statistical aggregates: `STDDEV_SAMP`, `COVAR_POP`, `COVAR_SAMP`, `CORR`, `MEDIAN`, `PERCENTILE_APPROX`, `BITWISE_AND_AGG`, `BITWISE_OR_AGG`, `BITWISE_XOR_AGG` |
| 24 | +- `MAX_BY` / `MIN_BY` as aliases for `ARG_MAX` / `ARG_MIN` |
| 25 | + |
| 26 | +### Fixed |
| 27 | + |
| 28 | +- `TO_DATE` format string preserved as-is (Hive was converting Oracle-style `mm` → `%M`) |
| 29 | +- `WEEKDAY` round-trips as `WEEKDAY(dt)` in MaxCompute output (other dialects still get the `(DAYOFWEEK + 5) % 7` arithmetic) |
| 30 | +- `DATETRUNC` week-unit emits valid `'week(monday)'` string literal instead of bare `WEEK(MONDAY)` |
| 31 | +- `groupconcat_sql` defaults separator to `','` when absent (prevents invalid `WM_CONCAT(col)`) |
| 32 | +- Python >=3.9 compatibility (removed `ipykernel`, relaxed `pytest` floor) |
| 33 | +- Added `sqlglot<31` upper bound to prevent unexpected breakage on major releases |
| 34 | + |
| 35 | +### Infrastructure |
| 36 | + |
| 37 | +- GitHub Actions CI across Python 3.9 / 3.10 / 3.11 / 3.12 |
| 38 | +- README with usage examples and function coverage table |
| 39 | + |
| 40 | +## [0.1.0] - 2026-03-01 |
| 41 | + |
| 42 | +Initial release. |
| 43 | + |
| 44 | +- MaxCompute dialect registered via Python entry points |
| 45 | +- Parser: ~40 date/time, string, array, and map functions |
| 46 | +- DDL: `LIFECYCLE`, `RANGE CLUSTERED BY`, `AUTO PARTITIONED BY` |
0 commit comments