Skip to content

Commit

Permalink
Re-gen sql.out
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxGekk committed Apr 14, 2021
1 parent 447e17b commit 8cab0f0
Show file tree
Hide file tree
Showing 5 changed files with 286 additions and 205 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -291,49 +291,47 @@ select timestamp '2019-01-01中文'
-- !query
select timestamp'2011-11-11 11:11:11' + interval '2' day
-- !query schema
struct<TIMESTAMP '2011-11-11 11:11:11' + INTERVAL '2 days':timestamp>
struct<TIMESTAMP '2011-11-11 11:11:11' + 172800000000:timestamp>
-- !query output
2011-11-13 11:11:11


-- !query
select timestamp'2011-11-11 11:11:11' - interval '2' day
-- !query schema
struct<TIMESTAMP '2011-11-11 11:11:11' - INTERVAL '2 days':timestamp>
struct<TIMESTAMP '2011-11-11 11:11:11' - 172800000000:timestamp>
-- !query output
2011-11-09 11:11:11


-- !query
select date'2011-11-11 11:11:11' + interval '2' second
-- !query schema
struct<>
struct<DATE '2011-11-11' + 2000000:timestamp>
-- !query output
java.lang.IllegalArgumentException
requirement failed: Cannot add hours, minutes or seconds, milliseconds, microseconds to a date
2011-11-11 00:00:02


-- !query
select date'2011-11-11 11:11:11' - interval '2' second
-- !query schema
struct<>
struct<DATE '2011-11-11' - 2000000:timestamp>
-- !query output
java.lang.IllegalArgumentException
requirement failed: Cannot add hours, minutes or seconds, milliseconds, microseconds to a date
2011-11-10 23:59:58


-- !query
select '2011-11-11' - interval '2' day
-- !query schema
struct<2011-11-11 - INTERVAL '2 days':string>
struct<2011-11-11 - 172800000000:string>
-- !query output
2011-11-09 00:00:00


-- !query
select '2011-11-11 11:11:11' - interval '2' second
-- !query schema
struct<2011-11-11 11:11:11 - INTERVAL '2 seconds':string>
struct<2011-11-11 11:11:11 - 2000000:string>
-- !query output
2011-11-11 11:11:09

Expand All @@ -353,7 +351,7 @@ select 1 - interval '2' second
struct<>
-- !query output
org.apache.spark.sql.AnalysisException
cannot resolve '1 + (- INTERVAL '2 seconds')' due to data type mismatch: argument 1 requires timestamp type, however, '1' is of int type.; line 1 pos 7
cannot resolve '1 + (- 2000000)' due to data type mismatch: argument 1 requires timestamp type, however, '1' is of int type.; line 1 pos 7


-- !query
Expand Down
Loading

0 comments on commit 8cab0f0

Please sign in to comment.