yaooqinn commented on a change in pull request #29627:
URL: https://github.com/apache/spark/pull/29627#discussion_r482647285



##########
File path: 
sql/catalyst/src/main/antlr4/org/apache/spark/sql/catalyst/parser/SqlBase.g4
##########
@@ -818,6 +818,7 @@ primaryExpression
 
 constant
     : NULL                                                                     
                #nullLiteral
+    | INTERVAL STRING AS? identifier?                                          
                #maybeAliasedIntervalLiteral

Review comment:
       ```sql
   presto> select interval '1 day' day;
   Query 20200903_015817_00008_gec8v failed: Invalid INTERVAL DAY value: 1 day
   
   presto> select interval '1' day day;
         day
   ----------------
    1 00:00:00.000
   (1 row)
   
   Query 20200903_015821_00009_gec8v, FINISHED, 1 node
   Splits: 17 total, 17 done (100.00%)
   0:00 [0 rows, 0B] [0 rows/s, 0B/s]
   
   presto> select interval '1' day;
        _col0
   ----------------
    1 00:00:00.000
   (1 row)
   
   Query 20200903_015825_00010_gec8v, FINISHED, 1 node
   Splits: 17 total, 17 done (100.00%)
   0:00 [0 rows, 0B] [0 rows/s, 0B/s]
   
   presto>
   ```




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to