Commit e09feda
committed
[SPARK-35978][SQL] Support non-reserved keyword TIMESTAMP_LTZ
### What changes were proposed in this pull request?
Support new keyword `TIMESTAMP_LTZ`, which can be used for:
- timestamp with local time zone data type in DDL
- timestamp with local time zone data type in Cast clause.
- timestamp with local time zone data type literal
### Why are the changes needed?
Users can use `TIMESTAMP_LTZ` in DDL/Cast/Literals for the timestamp with local time zone type directly. The new keyword is independent of the SQL configuration `spark.sql.timestampType`.
### Does this PR introduce _any_ user-facing change?
No, the new timestamp type is not released yet.
### How was this patch tested?
Unit test
Closes #33224 from gengliangwang/TIMESTAMP_LTZ.
Authored-by: Gengliang Wang <[email protected]>
Signed-off-by: Gengliang Wang <[email protected]>
(cherry picked from commit b0b9643)
Signed-off-by: Gengliang Wang <[email protected]>1 parent 22b303a commit e09feda
File tree
3 files changed
+26
-10
lines changed- sql/catalyst/src
- main/scala/org/apache/spark/sql/catalyst/parser
- test/scala/org/apache/spark/sql/catalyst/parser
3 files changed
+26
-10
lines changedLines changed: 10 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2119 | 2119 | | |
2120 | 2120 | | |
2121 | 2121 | | |
| 2122 | + | |
| 2123 | + | |
| 2124 | + | |
| 2125 | + | |
| 2126 | + | |
| 2127 | + | |
| 2128 | + | |
2122 | 2129 | | |
2123 | 2130 | | |
2124 | 2131 | | |
| |||
2128 | 2135 | | |
2129 | 2136 | | |
2130 | 2137 | | |
| 2138 | + | |
| 2139 | + | |
2131 | 2140 | | |
2132 | | - | |
2133 | | - | |
2134 | | - | |
2135 | | - | |
2136 | | - | |
2137 | | - | |
2138 | 2141 | | |
2139 | 2142 | | |
2140 | 2143 | | |
| |||
2529 | 2532 | | |
2530 | 2533 | | |
2531 | 2534 | | |
| 2535 | + | |
2532 | 2536 | | |
2533 | 2537 | | |
2534 | 2538 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
| 62 | + | |
62 | 63 | | |
63 | 64 | | |
64 | 65 | | |
| |||
Lines changed: 15 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
455 | 455 | | |
456 | 456 | | |
457 | 457 | | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
458 | 469 | | |
459 | 470 | | |
460 | 471 | | |
| |||
464 | 475 | | |
465 | 476 | | |
466 | 477 | | |
467 | | - | |
468 | | - | |
469 | | - | |
470 | | - | |
| 478 | + | |
471 | 479 | | |
472 | 480 | | |
473 | 481 | | |
| |||
477 | 485 | | |
478 | 486 | | |
479 | 487 | | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
480 | 491 | | |
481 | 492 | | |
482 | 493 | | |
| |||
0 commit comments