cloud-fan commented on a change in pull request #26285: [SPARK-29623][SQL] do not allow multiple unit TO unit statements in interval literal syntax URL: https://github.com/apache/spark/pull/26285#discussion_r339880267
########## File path: sql/catalyst/src/main/antlr4/org/apache/spark/sql/catalyst/parser/SqlBase.g4 ########## @@ -761,12 +761,24 @@ booleanValue ; interval - : {ansi}? INTERVAL? intervalField+ - | {!ansi}? INTERVAL intervalField* + : {ansi}? INTERVAL? (errorCapturingMultiUnitsInterval | errorCapturingUnitToUnitInterval) + | {!ansi}? INTERVAL (errorCapturingMultiUnitsInterval | errorCapturingUnitToUnitInterval) Review comment: `intervalField` can be single-unit statements like `1 year`, which is allowed to repeat. ---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org