spark-instrumented-optimizer/sql/catalyst/src/main
Kent Yao d99398e9f5 [SPARK-29855][SQL] typed literals with negative sign with proper result or exception
### What changes were proposed in this pull request?

```sql
-- !query 83
select -integer '7'
-- !query 83 schema
struct<7:int>
-- !query 83 output
7

-- !query 86
select -date '1999-01-01'
-- !query 86 schema
struct<DATE '1999-01-01':date>
-- !query 86 output
1999-01-01

-- !query 87
select -timestamp '1999-01-01'
-- !query 87 schema
struct<TIMESTAMP('1999-01-01 00:00:00'):timestamp>
-- !query 87 output
1999-01-01 00:00:00
```
the integer should be -7 and the date and timestamp results are confusing which should throw exceptions

### Why are the changes needed?

bug fix
### Does this PR introduce any user-facing change?

NO
### How was this patch tested?

ADD UTs

Closes #26479 from yaooqinn/SPARK-29855.

Authored-by: Kent Yao <yaooqinn@hotmail.com>
Signed-off-by: HyukjinKwon <gurwls223@apache.org>
2019-11-12 23:53:07 +09:00
..
antlr4/org/apache/spark/sql/catalyst/parser [SPARK-29519][SQL] SHOW TBLPROPERTIES should do multi-catalog resolution 2019-11-12 13:31:28 +08:00
java/org/apache/spark/sql [SPARK-29486][SQL] CalendarInterval should have 3 fields: months, days and microseconds 2019-11-01 18:12:33 +08:00
scala/org/apache/spark/sql [SPARK-29855][SQL] typed literals with negative sign with proper result or exception 2019-11-12 23:53:07 +09:00