[ 
https://issues.apache.org/jira/browse/FLINK-10323?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Timo Walther closed FLINK-10323.
--------------------------------
    Resolution: Duplicate

Duplicate of FLINK-10281.

> A single backslash cannot be successfully parsed in Java Table API
> ------------------------------------------------------------------
>
>                 Key: FLINK-10323
>                 URL: https://issues.apache.org/jira/browse/FLINK-10323
>             Project: Flink
>          Issue Type: Bug
>          Components: Table API & SQL
>    Affects Versions: 1.4.2, 1.5.3, 1.6.0
>            Reporter: Xingcan Cui
>            Priority: Major
>
> The snippet below will cause a parser exception.
> {code:java}
>  testAllApis(
>       concat_ws("~", "AA", "\\"),
>       "concat_ws('~','AA','\\')",
>       "concat_ws('~','AA','\\\\')",
>       "AA~\\")
> {code}
> {code}
> org.apache.flink.table.api.ExpressionParserException: Could not parse 
> expression at column 20: Invalid expression.
> concat_ws('~','AA','\')
>                    ^
>       at 
> org.apache.flink.table.expressions.ExpressionParser$.throwError(ExpressionParser.scala:549)
>       at 
> org.apache.flink.table.expressions.ExpressionParser$.parseExpression(ExpressionParser.scala:542)
>       at 
> org.apache.flink.table.expressions.utils.ExpressionTestBase.addTableApiTestExpr(ExpressionTestBase.scala:255)
>       at 
> org.apache.flink.table.expressions.utils.ExpressionTestBase.testAllApis(ExpressionTestBase.scala:265)
>       at 
> org.apache.flink.table.expressions.ScalarFunctionsTest.testConcatWs(ScalarFunctionsTest.scala:340)
> {code}
> However, with double (or more) backslashes, it will be successfully parsed.
> {code:java}
> testAllApis(
>       concat_ws("~", "AA", "\\\\"),
>       "concat_ws('~','AA','\\\\')",
>       "concat_ws('~','AA','\\\\\\\\')",
>       "AA~\\\\")
> {code}



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

Reply via email to