Commit 003593b
committed
test(db2): handle TIMESTAMPTZ in test_to_time_column (SQL0180N)
Db2 has no native timezone-aware TIMESTAMP type — TIMESTAMPTZ is mapped to
TIMESTAMP by db2_sqlglot. CAST('2020-01-01 00:00:00+00:00' AS TIMESTAMP)
is rejected with SQL0180N because Db2 TIMESTAMP literals do not accept a
UTC offset suffix (+00:00).
Fix mirrors the existing Clickhouse guard:
- Strip the +XX:XX offset from the string before calling to_time_column
- Downcast the type to plain TIMESTAMP so to_time_column uses to_ts()
- Add db2 to the TIMESTAMPTZ result dict with no-tz value (same as
mysql/fabric/spark, which also lack native timezone-aware types)1 parent d36f6b3 commit 003593b
1 file changed
Lines changed: 9 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2680 | 2680 | | |
2681 | 2681 | | |
2682 | 2682 | | |
| 2683 | + | |
2683 | 2684 | | |
2684 | 2685 | | |
2685 | 2686 | | |
| |||
2723 | 2724 | | |
2724 | 2725 | | |
2725 | 2726 | | |
| 2727 | + | |
| 2728 | + | |
| 2729 | + | |
| 2730 | + | |
| 2731 | + | |
| 2732 | + | |
| 2733 | + | |
| 2734 | + | |
2726 | 2735 | | |
2727 | 2736 | | |
2728 | 2737 | | |
| |||
0 commit comments