You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@tajo.apache.org by "Jaehwa Jung (JIRA)" <ji...@apache.org> on 2014/02/05 05:52:09 UTC

[jira] [Resolved] (TAJO-580) Union query with partitioned tables cause NPE.

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

Jaehwa Jung resolved TAJO-580.
------------------------------

    Resolution: Cannot Reproduce

It doesn't happen no more after applying [TAJO-581|https://issues.apache.org/jira/browse/TAJO-581].

> Union query with partitioned tables cause NPE.
> ----------------------------------------------
>
>                 Key: TAJO-580
>                 URL: https://issues.apache.org/jira/browse/TAJO-580
>             Project: Tajo
>          Issue Type: Bug
>          Components: planner/optimizer
>    Affects Versions: 0.8-incubating
>            Reporter: Jaehwa Jung
>            Assignee: Jaehwa Jung
>             Fix For: 0.8-incubating
>
>
> I found a bug when I tested union query with partitioned tables as follows:
> {code:xml}
> create external table table1 (id int, name text, score float, type text) using csv with ('csvfile.delimiter'='|') location 'hdfs://localhost:9010/tajo/warehouse/table1' ;
> create table table2 (id int, name text, score float, type text) using csv with ('csvfile.delimiter'='|') partition by column(part text);
> insert overwrite into table2
> select id, name, score, type, '20140203'
> from table1;
> create table table3 (id int, name text, score float, type text) using csv with ('csvfile.delimiter'='|') partition by column(part text);
> select id, name 
> from table2 
> where part = '20140203' 
> union 
> select id, name 
> from table3 
> where part = '20140203';
> java.lang.NullPointerException
> 	at org.apache.tajo.engine.planner.LogicalPlan.getNormalizedColumnName(LogicalPlan.java:183)
> 	at org.apache.tajo.engine.planner.ExprNormalizer.visitColumnReference(ExprNormalizer.java:253)
> 	at org.apache.tajo.engine.planner.ExprNormalizer.visitColumnReference(ExprNormalizer.java:77)
> 	at org.apache.tajo.engine.planner.BaseAlgebraVisitor.visit(BaseAlgebraVisitor.java:196)
> 	at org.apache.tajo.engine.planner.SimpleAlgebraVisitor.visit(SimpleAlgebraVisitor.java:41)
> 	at org.apache.tajo.engine.planner.SimpleAlgebraVisitor.visitBinaryOperator(SimpleAlgebraVisitor.java:56)
> 	at org.apache.tajo.engine.planner.ExprNormalizer.visitBinaryOperator(ExprNormalizer.java:160)
> 	at org.apache.tajo.engine.planner.ExprNormalizer.visitBinaryOperator(ExprNormalizer.java:77)
> 	at org.apache.tajo.engine.planner.SimpleAlgebraVisitor.visit(SimpleAlgebraVisitor.java:38)
> 	at org.apache.tajo.engine.planner.ExprNormalizer.normalize(ExprNormalizer.java:103)
> 	at org.apache.tajo.engine.planner.LogicalPlanner.visitFilter(LogicalPlanner.java:701)
> 	at org.apache.tajo.engine.planner.LogicalPlanner.visitFilter(LogicalPlanner.java:55)
> 	at org.apache.tajo.engine.planner.BaseAlgebraVisitor.visit(BaseAlgebraVisitor.java:73)
> 	at org.apache.tajo.engine.planner.LogicalPlanner.visitProjection(LogicalPlanner.java:188)
> 	at org.apache.tajo.engine.planner.LogicalPlanner.visitProjection(LogicalPlanner.java:55)
> 	at org.apache.tajo.engine.planner.BaseAlgebraVisitor.visit(BaseAlgebraVisitor.java:55)
> 	at org.apache.tajo.engine.planner.LogicalPlanner.buildSetPlan(LogicalPlanner.java:1060)
> 	at org.apache.tajo.engine.planner.LogicalPlanner.visitUnion(LogicalPlanner.java:1032)
> 	at org.apache.tajo.engine.planner.LogicalPlanner.visitUnion(LogicalPlanner.java:55)
> 	at org.apache.tajo.engine.planner.BaseAlgebraVisitor.visit(BaseAlgebraVisitor.java:76)
> 	at org.apache.tajo.engine.planner.LogicalPlanner.createPlan(LogicalPlanner.java:106)
> 	at org.apache.tajo.master.GlobalEngine.createLogicalPlan(GlobalEngine.java:245)
> 	at org.apache.tajo.master.GlobalEngine.executeQuery(GlobalEngine.java:136)
> {code}
> For reference, I used data file as follows: 
> {code:xml}
> data.csv
> 1|abc|1.1|a
> 2|def|2.3|b
> 3|ghi|3.4|c
> 4|jkl|4.5|d
> 5|mno|5.6|e
> {code}
> And if I don't write where clause, I can't find this error.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)