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
no viable alternative at input 'day'(line 1, pos 34)
336
348
337
349
== SQL ==
338
350
select date '2012-01-01' - 30 day day day
339
-
--------------------------------------^^^
351
+
----------------------------------^^^
340
352
341
353
342
354
-- !query 27
@@ -360,17 +372,27 @@ select date '2012-01-01' + interval (-30) day
360
372
-- !query 29 schema
361
373
struct<>
362
374
-- !query 29 output
363
-
org.apache.spark.sql.AnalysisException
364
-
Undefined function: 'interval'. This function is neither a registered temporary function nor a permanent function registered in the database 'default'.; line 1 pos 27
no viable alternative at input 'day'(line 1, pos 33)
392
+
393
+
== SQL ==
394
+
select date '2012-01-01' + (-30) day
395
+
---------------------------------^^^
374
396
375
397
376
398
-- !query 31
@@ -386,17 +408,27 @@ select date '2012-01-01' + interval (a + 1) day from t
386
408
-- !query 32 schema
387
409
struct<>
388
410
-- !query 32 output
389
-
org.apache.spark.sql.AnalysisException
390
-
Undefined function: 'interval'. This function is neither a registered temporary function nor a permanent function registered in the database 'default'.; line 1 pos 27
no viable alternative at input 'day'(line 1, pos 44)
414
+
415
+
== SQL ==
416
+
select date '2012-01-01' + interval (a + 1) day from t
417
+
--------------------------------------------^^^
391
418
392
419
393
420
-- !query 33
394
421
select date '2012-01-01' + (a + 1) day from t
395
422
-- !query 33 schema
396
423
struct<>
397
424
-- !query 33 output
398
-
org.apache.spark.sql.AnalysisException
399
-
cannot resolve '(DATE '2012-01-01' + (t.`a` + 1))' due to data type mismatch: differing types in '(DATE '2012-01-01' + (t.`a` + 1))' (date and int).; line 1 pos 7
0 commit comments