You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
struct<TIMESTAMP '2011-11-11 11:11:11' - INTERVAL '2 00:00:00' DAY TO SECOND:timestamp>
303
303
-- !query output
304
304
2011-11-09 11:11:11
305
305
306
306
307
307
-- !query
308
308
select date'2011-11-11 11:11:11' + interval '2' second
309
309
-- !query schema
310
-
struct<DATE '2011-11-11' + 2000000:timestamp>
310
+
struct<DATE '2011-11-11' + INTERVAL '0 00:00:02' DAY TO SECOND:timestamp>
311
311
-- !query output
312
312
2011-11-11 00:00:02
313
313
314
314
315
315
-- !query
316
316
select date'2011-11-11 11:11:11' - interval '2' second
317
317
-- !query schema
318
-
struct<DATE '2011-11-11' - 2000000:timestamp>
318
+
struct<DATE '2011-11-11' - INTERVAL '0 00:00:02' DAY TO SECOND:timestamp>
319
319
-- !query output
320
320
2011-11-10 23:59:58
321
321
322
322
323
323
-- !query
324
324
select '2011-11-11' - interval '2' day
325
325
-- !query schema
326
-
struct<2011-11-11 - 172800000000:string>
326
+
struct<2011-11-11 - INTERVAL '2 00:00:00' DAY TO SECOND:string>
327
327
-- !query output
328
328
2011-11-09 00:00:00
329
329
330
330
331
331
-- !query
332
332
select '2011-11-11 11:11:11' - interval '2' second
333
333
-- !query schema
334
-
struct<2011-11-11 11:11:11 - 2000000:string>
334
+
struct<2011-11-11 11:11:11 - INTERVAL '0 00:00:02' DAY TO SECOND:string>
335
335
-- !query output
336
336
2011-11-11 11:11:09
337
337
@@ -351,7 +351,7 @@ select 1 - interval '2' second
351
351
struct<>
352
352
-- !query output
353
353
org.apache.spark.sql.AnalysisException
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
354
+
cannot resolve '1 + (- INTERVAL '0 00:00:02' DAY TO SECOND)' due to data type mismatch: argument 1 requires timestamp type, however, '1' is of int type.; line 1 pos 7
0 commit comments