phoenix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Taylor (JIRA)" <j...@apache.org>
Subject [jira] [Reopened] (PHOENIX-2602) Parser does not handle escaped LPAREN
Date Sat, 13 Feb 2016 08:11:18 GMT

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

James Taylor reopened PHOENIX-2602:
-----------------------------------

I'm seeing these warning after this change. Would you mind investigating, [~tdsilva]?
{code}
PhoenixSQL.g
warning(200): PhoenixSQL.g:1210:5: 
Decision can match input such as "'\\''\'''\'''\''{'\u0000'..'&', '('..'\uFFFF'}" using
multiple alternatives: 1, 2

As a result, alternative(s) 2 were disabled for that input
warning(200): PhoenixSQL.g:1210:5: 
Decision can match input such as "'\\''\\'" using multiple alternatives: 1, 2

As a result, alternative(s) 2 were disabled for that input
warning(200): PhoenixSQL.g:1210:5: 
Decision can match input such as "'\\''"'" using multiple alternatives: 1, 2

As a result, alternative(s) 2 were disabled for that input
warning(200): PhoenixSQL.g:1210:5: 
Decision can match input such as "'\\''b'" using multiple alternatives: 1, 2

As a result, alternative(s) 2 were disabled for that input
warning(200): PhoenixSQL.g:1210:5: 
Decision can match input such as "'\\''r'" using multiple alternatives: 1, 2

As a result, alternative(s) 2 were disabled for that input
warning(200): PhoenixSQL.g:1210:5: 
Decision can match input such as "'\\''_'" using multiple alternatives: 1, 2

As a result, alternative(s) 2 were disabled for that input
warning(200): PhoenixSQL.g:1210:5: 
Decision can match input such as "'\\''f'" using multiple alternatives: 1, 2

As a result, alternative(s) 2 were disabled for that input
warning(200): PhoenixSQL.g:1210:5: 
Decision can match input such as "'\\''t'" using multiple alternatives: 1, 2

As a result, alternative(s) 2 were disabled for that input
warning(200): PhoenixSQL.g:1210:5: 
Decision can match input such as "'\\''n'" using multiple alternatives: 1, 2

As a result, alternative(s) 2 were disabled for that input
{code}

> 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
>            Assignee: Thomas D'Silva
>             Fix For: 4.7.0
>
>         Attachments: PHOENIX-2602-4.x-HBase-0.98.patch
>
>
> 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)

Mime
View raw message