cloud-fan commented on a change in pull request #26623: [SPARK-29983][SQL] Add an independent config for an optional INTERVAL clause URL: https://github.com/apache/spark/pull/26623#discussion_r349008723
########## File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/parser/ParseDriver.scala ########## @@ -101,6 +101,7 @@ abstract class AbstractSqlParser(conf: SQLConf) extends ParserInterface with Log lexer.addErrorListener(ParseErrorListener) lexer.legacy_setops_precedence_enbled = conf.setOpsPrecedenceEnforced lexer.SQL_standard_keyword_behavior = SQLStandardKeywordBehavior + lexer.optional_interval = conf.optionalInterval Review comment: I think it should be `dialect == Spark && ansi == true && optionalInterval` For pgsql diaelct, INTERVAL can't be optional. for non-ansi mode, year/month/day... are not reserved keywords and we can't ommit INTERVAL prefix anyway. ---------------------------------------------------------------- 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