Skip to content

Commit 8cab0f0

Browse files
committed
Re-gen sql.out
1 parent 447e17b commit 8cab0f0

File tree

5 files changed

+286
-205
lines changed

5 files changed

+286
-205
lines changed

sql/core/src/test/resources/sql-tests/results/ansi/datetime.sql.out

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -291,49 +291,47 @@ select timestamp '2019-01-01中文'
291291
-- !query
292292
select timestamp'2011-11-11 11:11:11' + interval '2' day
293293
-- !query schema
294-
struct<TIMESTAMP '2011-11-11 11:11:11' + INTERVAL '2 days':timestamp>
294+
struct<TIMESTAMP '2011-11-11 11:11:11' + 172800000000:timestamp>
295295
-- !query output
296296
2011-11-13 11:11:11
297297

298298

299299
-- !query
300300
select timestamp'2011-11-11 11:11:11' - interval '2' day
301301
-- !query schema
302-
struct<TIMESTAMP '2011-11-11 11:11:11' - INTERVAL '2 days':timestamp>
302+
struct<TIMESTAMP '2011-11-11 11:11:11' - 172800000000:timestamp>
303303
-- !query output
304304
2011-11-09 11:11:11
305305

306306

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

315314

316315
-- !query
317316
select date'2011-11-11 11:11:11' - interval '2' second
318317
-- !query schema
319-
struct<>
318+
struct<DATE '2011-11-11' - 2000000:timestamp>
320319
-- !query output
321-
java.lang.IllegalArgumentException
322-
requirement failed: Cannot add hours, minutes or seconds, milliseconds, microseconds to a date
320+
2011-11-10 23:59:58
323321

324322

325323
-- !query
326324
select '2011-11-11' - interval '2' day
327325
-- !query schema
328-
struct<2011-11-11 - INTERVAL '2 days':string>
326+
struct<2011-11-11 - 172800000000:string>
329327
-- !query output
330328
2011-11-09 00:00:00
331329

332330

333331
-- !query
334332
select '2011-11-11 11:11:11' - interval '2' second
335333
-- !query schema
336-
struct<2011-11-11 11:11:11 - INTERVAL '2 seconds':string>
334+
struct<2011-11-11 11:11:11 - 2000000:string>
337335
-- !query output
338336
2011-11-11 11:11:09
339337

@@ -353,7 +351,7 @@ select 1 - interval '2' second
353351
struct<>
354352
-- !query output
355353
org.apache.spark.sql.AnalysisException
356-
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
354+
cannot resolve '1 + (- 2000000)' due to data type mismatch: argument 1 requires timestamp type, however, '1' is of int type.; line 1 pos 7
357355

358356

359357
-- !query

0 commit comments

Comments
 (0)