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



##########
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:
       ```
   postgres=# select interval '1 day' day;
    interval
   ----------
    1 day
   (1 row)
   
   postgres=# select interval '1' day day;
   ERROR:  syntax error at or near "day"
   LINE 1: select interval '1' day day;
                                   ^
   postgres=# select interval '1' day;
    interval
   ----------
    1 day
   (1 row)
   ```
   
   
   
   




----------------------------------------------------------------
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