You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@phoenix.apache.org by "Maryann Xue (JIRA)" <ji...@apache.org> on 2016/01/05 22:10:39 UTC

[jira] [Resolved] (PHOENIX-2425) Invalid sql syntax produces NPE instead of meaningful error message

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

Maryann Xue resolved PHOENIX-2425.
----------------------------------
    Resolution: Fixed

> Invalid sql syntax produces NPE instead of meaningful error message
> -------------------------------------------------------------------
>
>                 Key: PHOENIX-2425
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-2425
>             Project: Phoenix
>          Issue Type: Bug
>    Affects Versions: 4.6.0
>            Reporter: Nick Dimiduk
>            Assignee: Maryann Xue
>            Priority: Minor
>         Attachments: PHOENIX-2425.patch
>
>
> I would expect a better error message here:
> {noformat}
> 0: jdbc:phoenix:localhost> select * limit 10;
> java.lang.NullPointerException
>         at org.apache.phoenix.compile.ProjectionCompiler.projectAllTableColumns(ProjectionCompiler.java:140)
>         at org.apache.phoenix.compile.ProjectionCompiler.compile(ProjectionCompiler.java:371)
>         at org.apache.phoenix.compile.QueryCompiler.compileSingleFlatQuery(QueryCompiler.java:539)
>         at org.apache.phoenix.compile.QueryCompiler.compileSingleQuery(QueryCompiler.java:490)
>         at org.apache.phoenix.compile.QueryCompiler.compileSelect(QueryCompiler.java:201)
>         at org.apache.phoenix.compile.QueryCompiler.compile(QueryCompiler.java:158)
>         at org.apache.phoenix.jdbc.PhoenixStatement$ExecutableSelectStatement.compilePlan(PhoenixStatement.java:383)
>         at org.apache.phoenix.jdbc.PhoenixStatement$ExecutableSelectStatement.compilePlan(PhoenixStatement.java:357)
>         at org.apache.phoenix.jdbc.PhoenixStatement$1.call(PhoenixStatement.java:263)
>         at org.apache.phoenix.jdbc.PhoenixStatement$1.call(PhoenixStatement.java:258)
>         at org.apache.phoenix.call.CallRunner.run(CallRunner.java:53)
>         at org.apache.phoenix.jdbc.PhoenixStatement.executeQuery(PhoenixStatement.java:257)
>         at org.apache.phoenix.jdbc.PhoenixStatement.execute(PhoenixStatement.java:1438)
>         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)
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)