[ 
https://issues.apache.org/jira/browse/FLINK-10222?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16612467#comment-16612467
 ] 

ASF GitHub Bot commented on FLINK-10222:
----------------------------------------

walterddr 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_r217113231
 
 

 ##########
 File path: 
flink-libraries/flink-table/src/main/scala/org/apache/flink/table/expressions/ExpressionParser.scala
 ##########
 @@ -45,6 +45,13 @@ object ExpressionParser extends JavaTokenParsers with 
PackratParsers {
     ("""(?i)\Q""" + kw.key + """\E""").r
   }
 
+  // Convert the keyword into an case insensitive Parser
+  // It uses an exact matching mode. scenes to be used:
+  // a keyword as a suffix no required parameter and not as a prefix
+  def keyword2ParserForSuffixButNotAsPrefix(kw: Keyword): Parser[String] = {
 
 Review comment:
   I dont necessarily think making the suffix keyword to always situated at end 
of line (`$` assertion) is a must. We just need to prevent potentially keyword 
collision with identical prefix. Probably adding an assertion that `Keyword` 
does not follow by alphabetical character is suffice?

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


> Table scalar function expression parses error when function name equals the 
> exists keyword suffix
> -------------------------------------------------------------------------------------------------
>
>                 Key: FLINK-10222
>                 URL: https://issues.apache.org/jira/browse/FLINK-10222
>             Project: Flink
>          Issue Type: Bug
>          Components: Table API & SQL
>            Reporter: vinoyang
>            Priority: Major
>              Labels: pull-request-available
>
> Suffix extraction in ExpressionParser.scala does not actually support 
> extraction of keywords with the same prefix. For example: Adding suffix 
> parsing rules for {{a.fun}} and {{a.function}} simultaneously will causes 
> exceptions. 
> some discussion : 
> [https://github.com/apache/flink/pull/6432#issuecomment-416127815]
> https://github.com/apache/flink/pull/6585#discussion_r212797015



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to