fhueske commented on a change in pull request #6622: [FLINK-10222] [table] 
Table scalar function expression parses error when function name equals the 
exists keyword suffix
URL: https://github.com/apache/flink/pull/6622#discussion_r217701805
 
 

 ##########
 File path: 
flink-libraries/flink-table/src/main/scala/org/apache/flink/table/expressions/ExpressionParser.scala
 ##########
 @@ -45,6 +45,12 @@ object ExpressionParser extends JavaTokenParsers with 
PackratParsers {
     ("""(?i)\Q""" + kw.key + """\E""").r
   }
 
+  // Convert the keyword into an case insensitive Parser
+  // It uses an more precisely matching mode for suffix keywords.
+  def suffixKeyword2Parser(kw: Keyword): Parser[String] = {
+    ("""(?i)\Q""" + kw.key + """\E(?![_$a-zA-Z0-9])""").r
 
 Review comment:
   We should match also Unicode letters, not just ASCII (`a-zA-Z`).

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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

Reply via email to