cloud-fan commented on a change in pull request #27495: [SPARK-28880][SQL] Support ANSI nested bracketed comments URL: https://github.com/apache/spark/pull/27495#discussion_r380455220
########## File path: sql/catalyst/src/main/antlr4/org/apache/spark/sql/catalyst/parser/SqlBase.g4 ########## @@ -1797,11 +1797,11 @@ SIMPLE_COMMENT ; BRACKETED_EMPTY_COMMENT - : '/**/' -> channel(HIDDEN) + : '/*' BRACKETED_EMPTY_COMMENT? '*/' -> channel(HIDDEN) ; BRACKETED_COMMENT Review comment: the hint and comment syntax are so similar and it's too hacky to put one as parser rule and one as lexer rule. Your fix looks correct, but it's hard to reason about and @gengliangwang has pointed our issues twice. I think we should make them both parser rules (hint needs to create a plan so can't be lexer rule) ---------------------------------------------------------------- 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