Double-quotes are for Java. SQL uses single quotes.

> On Jan 23, 2018, at 3:48 PM, Nirav Patel <[email protected]> wrote:
> 
> Trying to parse literal string as expression using:
> 
>   val parser = SqlParser.create(expression) //sqlParserConfig
> 
>    val sqlNode = parser.parseExpression()
> 
> 
> expression can be sql function, sql identifier or sql literal. It is
> failing for expression "2017%"
> 
> 
> Caused by: org.apache.calcite.sql.parser.impl.ParseException: Encountered
> "% <EOF>" at line 1, column 5.
> 
> Was expecting one of:
> 
>    <EOF>
> 
>    "NOT" ...
> 
>    "IN" ...
> 
>    "<" ...
> 
>    "<=" ...
> 
>    ">" ...
> 
>    ">=" ...
> 
>    "=" ...
> 
>    "<>" ...
> 
>    "!=" ...
> 
>    "BETWEEN" ...
> 
>    "LIKE" ...
> 
>    "SIMILAR" ...
> 
>    "+" ...
> 
>    "-" ...
> 
>    "*" ...
> 
>    "/" ...
> 
>    "%" "+" ...
> 
> -- 
> 
> 
> [image: What's New with Xactly] <http://www.xactlycorp.com/email-click/>
> 
> <https://www.instagram.com/xactlycorp/>   
> <https://www.linkedin.com/company/xactly-corporation>   
> <https://twitter.com/Xactly>   <https://www.facebook.com/XactlyCorp>   
> <http://www.youtube.com/xactlycorporation>

Reply via email to