You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@phoenix.apache.org by "Nick Dimiduk (JIRA)" <ji...@apache.org> on 2016/01/15 23:07:39 UTC
[jira] [Created] (PHOENIX-2602) Parser does not handle escaped
LPAREN
Nick Dimiduk created PHOENIX-2602:
-------------------------------------
Summary: Parser does not handle escaped LPAREN
Key: PHOENIX-2602
URL: https://issues.apache.org/jira/browse/PHOENIX-2602
Project: Phoenix
Issue Type: Bug
Affects Versions: 4.6.0
Reporter: Nick Dimiduk
Seems parsing string literals isn't working quite right.
{noformat}
0: jdbc:phoenix:localhost> explain select foo from bar where foo not like '%\(%' ;
line 1:50 no viable alternative at character '('
Error: ERROR 602 (42P00): Syntax error. Missing "LPAREN" at line 1, column 35. (state=42P00,code=602)
org.apache.phoenix.exception.PhoenixParserException: ERROR 602 (42P00): Syntax error. Missing "LPAREN" at line 1, column 35.
at org.apache.phoenix.exception.PhoenixParserException.newException(PhoenixParserException.java:33)
at org.apache.phoenix.parse.SQLParser.parseStatement(SQLParser.java:111)
at org.apache.phoenix.jdbc.PhoenixStatement$PhoenixStatementParser.parseStatement(PhoenixStatement.java:1285)
at org.apache.phoenix.jdbc.PhoenixStatement.parseStatement(PhoenixStatement.java:1366)
at org.apache.phoenix.jdbc.PhoenixStatement.execute(PhoenixStatement.java:1429)
at sqlline.Commands.execute(Commands.java:822)
at sqlline.Commands.sql(Commands.java:732)
at sqlline.SqlLine.dispatch(SqlLine.java:808)
at sqlline.SqlLine.begin(SqlLine.java:681)
at sqlline.SqlLine.start(SqlLine.java:398)
at sqlline.SqlLine.main(SqlLine.java:292)
Caused by: MissingTokenException(inserted [@-1,0:0='<missing LPAREN>',<90>,1:34] at foo)
at org.apache.phoenix.parse.PhoenixSQLParser.recoverFromMismatchedToken(PhoenixSQLParser.java:350)
at org.antlr.runtime.BaseRecognizer.match(BaseRecognizer.java:115)
at org.apache.phoenix.parse.PhoenixSQLParser.not_expression(PhoenixSQLParser.java:6463)
at org.apache.phoenix.parse.PhoenixSQLParser.and_expression(PhoenixSQLParser.java:6283)
at org.apache.phoenix.parse.PhoenixSQLParser.or_expression(PhoenixSQLParser.java:6220)
at org.apache.phoenix.parse.PhoenixSQLParser.expression(PhoenixSQLParser.java:6185)
at org.apache.phoenix.parse.PhoenixSQLParser.single_select(PhoenixSQLParser.java:4388)
at org.apache.phoenix.parse.PhoenixSQLParser.unioned_selects(PhoenixSQLParser.java:4470)
at org.apache.phoenix.parse.PhoenixSQLParser.select_node(PhoenixSQLParser.java:4535)
at org.apache.phoenix.parse.PhoenixSQLParser.oneStatement(PhoenixSQLParser.java:766)
at org.apache.phoenix.parse.PhoenixSQLParser.explain_node(PhoenixSQLParser.java:987)
at org.apache.phoenix.parse.PhoenixSQLParser.oneStatement(PhoenixSQLParser.java:946)
at org.apache.phoenix.parse.PhoenixSQLParser.statement(PhoenixSQLParser.java:500)
at org.apache.phoenix.parse.SQLParser.parseStatement(SQLParser.java:108)
... 9 more
{noformat}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)