You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2018/11/03 09:01:00 UTC

[jira] [Commented] (FLINK-10463) Null literal cannot be properly parsed in Java Table API function call

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

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

xccui commented on issue #6888: [FLINK-10463][table] Null literal cannot be properly parsed in Java Table API function call
URL: https://github.com/apache/flink/pull/6888#issuecomment-435572138
 
 
   Sorry for the late response @hequn8128. As illustrated in [this stackoverflow question](https://stackoverflow.com/questions/26453870/scala-packratparsers-does-not-backtrack-as-it-should), patterns reordering could be the proper way to deal with this problem. +1 to your solution.
   
   BTW, @twalthr, it seems that the doc for expression syntax in `TableAPI.md` has not been maintained for a long time. As the syntax being more and more complicated, do you think we should still keep them “strongly consistent” with the codes? 

----------------------------------------------------------------
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:
users@infra.apache.org


> Null literal cannot be properly parsed in Java Table API function call
> ----------------------------------------------------------------------
>
>                 Key: FLINK-10463
>                 URL: https://issues.apache.org/jira/browse/FLINK-10463
>             Project: Flink
>          Issue Type: Bug
>          Components: Table API &amp; SQL
>            Reporter: Xingcan Cui
>            Assignee: Hequn Cheng
>            Priority: Major
>              Labels: pull-request-available
>
> For example, the expression `Null(STRING).regexpReplace('oo|ar', '')` throws the following exception.
> {code:java}
> org.apache.flink.table.api.ExpressionParserException: Could not parse expression at column 13: string matching regex `(?i)\Qas\E(?![_$\p{javaJavaIdentifierPart}])' expected but `.' found
> Null(STRING).regexpReplace('oo|ar', '')
>             ^
> 	at org.apache.flink.table.expressions.ExpressionParser$.throwError(ExpressionParser.scala:576)
> 	at org.apache.flink.table.expressions.ExpressionParser$.parseExpression(ExpressionParser.scala:569)
> {code}



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