Commit a14d73e
committed
[SPARK-52042][SQL] Fix an error of supported typed literals
### What changes were proposed in this pull request?
In the PR, I propose to fix the list of supported typed literals in the error message, for example:
```sql
[UNSUPPORTED_TYPED_LITERAL] Literals of the type "LOCALTIME" are not supported. Supported types are "DATE", "TIMESTAMP_NTZ", "TIMESTAMP_LTZ", "TIMESTAMP", "INTERVAL", "X". SQLSTATE: 0A000
== SQL (line 1, position 8) ==
SELECT localtime'12:30:41'
```
The error message does not include `TIME` which was added by apache#50228.
### Why are the changes needed?
To don't confuse users regarding the supported typed literals.
### Does this PR introduce _any_ user-facing change?
No, it shouldn't.
### How was this patch tested?
By running the modified test suites:
```
$ build/sbt "sql/testOnly org.apache.spark.sql.SQLQueryTestSuite -- -z literals.sql"
$ build/sbt "test:testOnly *ExpressionParserSuite"
```
### Was this patch authored or co-authored using generative AI tooling?
No.
Closes apache#50834 from MaxGekk/fix-time-literal-error.
Authored-by: Max Gekk <[email protected]>
Signed-off-by: Max Gekk <[email protected]>1 parent 9831552 commit a14d73e
File tree
6 files changed
+6
-6
lines changed- sql
- catalyst/src
- main/scala/org/apache/spark/sql/catalyst/parser
- test/scala/org/apache/spark/sql/catalyst/parser
- core/src/test/resources/sql-tests
- analyzer-results
- nonansi
- results
- nonansi
6 files changed
+6
-6
lines changedLines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3439 | 3439 | | |
3440 | 3440 | | |
3441 | 3441 | | |
3442 | | - | |
| 3442 | + | |
3443 | 3443 | | |
3444 | 3444 | | |
3445 | 3445 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
705 | 705 | | |
706 | 706 | | |
707 | 707 | | |
708 | | - | |
| 708 | + | |
709 | 709 | | |
710 | 710 | | |
711 | 711 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
402 | 402 | | |
403 | 403 | | |
404 | 404 | | |
405 | | - | |
| 405 | + | |
406 | 406 | | |
407 | 407 | | |
408 | 408 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
402 | 402 | | |
403 | 403 | | |
404 | 404 | | |
405 | | - | |
| 405 | + | |
406 | 406 | | |
407 | 407 | | |
408 | 408 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
454 | 454 | | |
455 | 455 | | |
456 | 456 | | |
457 | | - | |
| 457 | + | |
458 | 458 | | |
459 | 459 | | |
460 | 460 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
454 | 454 | | |
455 | 455 | | |
456 | 456 | | |
457 | | - | |
| 457 | + | |
458 | 458 | | |
459 | 459 | | |
460 | 460 | | |
| |||
0 commit comments