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

Jaanai updated PHOENIX-4904:
----------------------------
    Attachment: PHOENIX-4904-master.patch

> NPE exception when use non-existing fields in function 
> -------------------------------------------------------
>
>                 Key: PHOENIX-4904
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-4904
>             Project: Phoenix
>          Issue Type: Bug
>    Affects Versions: 4.12.0, 4.13.0, 4.14.0
>            Reporter: Jaanai
>            Assignee: Jaanai
>            Priority: Major
>         Attachments: PHOENIX-4904-master.patch
>
>
> Using following SQL to reoccur error:
> {code:sql}
> create table "test_truncate"("ROW" varchar primary key,"f"."0" 
> varchar,"f"."1" varchar);
> select * from "test_truncate" order by TO_NUMBER("f.1");
> {code}
> Exception information:
> {code}
> java.lang.NullPointerException     at 
> org.apache.phoenix.util.SchemaUtil.getSchemaNameFromFullName(SchemaUtil.java:632)
>      at 
> org.apache.phoenix.schema.TableNotFoundException.(TableNotFoundException.java:44)
>      at 
> org.apache.phoenix.compile.FromCompiler$MultiTableColumnResolver.resolveTable(FromCompiler.java:858)
>      at 
> org.apache.phoenix.compile.FromCompiler$ProjectedTableColumnResolver.resolveColumn(FromCompiler.java:984)
>      at 
> org.apache.phoenix.compile.ExpressionCompiler.resolveColumn(ExpressionCompiler.java:372)
>      at 
> org.apache.phoenix.compile.ExpressionCompiler.visit(ExpressionCompiler.java:408)
>      at 
> org.apache.phoenix.compile.ExpressionCompiler.visit(ExpressionCompiler.java:146)
>      at 
> org.apache.phoenix.parse.ColumnParseNode.accept(ColumnParseNode.java:56)     
> at 
> org.apache.phoenix.parse.CompoundParseNode.acceptChildren(CompoundParseNode.java:64)
>      at 
> org.apache.phoenix.parse.FunctionParseNode.accept(FunctionParseNode.java:84)  
>    at 
> org.apache.phoenix.compile.OrderByCompiler.compile(OrderByCompiler.java:123)  
>    at 
> org.apache.phoenix.compile.QueryCompiler.compileSingleFlatQuery(QueryCompiler.java:562)
>      at 
> org.apache.phoenix.compile.QueryCompiler.compileSingleQuery(QueryCompiler.java:507)
>      at 
> org.apache.phoenix.compile.QueryCompiler.compileSelect(QueryCompiler.java:202)
>      at 
> org.apache.phoenix.compile.QueryCompiler.compile(QueryCompiler.java:157)     
> at 
> org.apache.phoenix.jdbc.PhoenixStatement$ExecutableSelectStatement.compilePlan(PhoenixStatement.java:478)
>      at 
> org.apache.phoenix.jdbc.PhoenixStatement$ExecutableSelectStatement.compilePlan(PhoenixStatement.java:444)
>      a
> {code}



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

Reply via email to