MaxGekk commented on a change in pull request #26190: [SPARK-29532][SQL] 
simplify interval string parsing
URL: https://github.com/apache/spark/pull/26190#discussion_r337039762
 
 

 ##########
 File path: 
sql/catalyst/src/main/antlr4/org/apache/spark/sql/catalyst/parser/SqlBase.g4
 ##########
 @@ -79,6 +79,10 @@ singleTableSchema
     : colTypeList EOF
     ;
 
+singleInterval
+    : INTERVAL? (intervalValue intervalUnit)+ EOF
 
 Review comment:
   The SQL standard doesn't define interval strings in such format with the 
`'interval'` prefix (or I haven't found that). If we look at other DBMS, for 
instance PostgreSQL, it supports strings without the prefix only.
   
   I think we could support only strings without the prefix since Spark 3.0 
because we haven't support bulk saving interval strings so far (in JSON or CSV, 
for example).

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


With regards,
Apache Git Services

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

Reply via email to