[
https://issues.apache.org/jira/browse/TAJO-1574?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14514168#comment-14514168
]
Hudson commented on TAJO-1574:
------------------------------
SUCCESS: Integrated in Tajo-master-build #689 (See
[https://builds.apache.org/job/Tajo-master-build/689/])
TAJO-1574: Fix NPE on natural join. (jihoonson: rev
1971d85fce473da5cec407adecf89117253eca45)
* CHANGES
* tajo-algebra/src/main/java/org/apache/tajo/algebra/Join.java
* tajo-core/src/test/resources/queries/TestJoinQuery/testNaturalJoin.sql
* tajo-core/src/test/resources/results/TestJoinQuery/testNaturalJoin.result
* tajo-plan/src/main/java/org/apache/tajo/plan/algebra/BaseAlgebraVisitor.java
* tajo-core/src/test/java/org/apache/tajo/engine/query/TestJoinQuery.java
> Fix NPE on natural join
> -----------------------
>
> Key: TAJO-1574
> URL: https://issues.apache.org/jira/browse/TAJO-1574
> Project: Tajo
> Issue Type: Bug
> Reporter: Dongjoon Hyun
> Assignee: Dongjoon Hyun
> Priority: Minor
> Fix For: 0.11.0, 0.10.1
>
> Attachments: TAJO-1574.Hyun.150421.0.patch.txt
>
>
> NPE occurs in a natural join.
> {code}
> default> create table t(a int);
> default> insert overwrite into t select 1;
> default> create table s(a int);
> default> insert overwrite into s select 1;
> default> select * from t natural join s;
> {code}
> The main reason is *joinQual* is null.
> {code}
> public RESULT visitJoin(CONTEXT ctx, Stack<Expr> stack, Join expr) throws
> PlanningException {
> stack.push(expr);
> - visit(ctx, stack, expr.getQual());
> + if (expr.getQual() != null) {
> + visit(ctx, stack, expr.getQual());
> + }
> {code}
> {code}
> - join.joinQual = (Expr) joinQual.clone();
> + if (joinQual != null) {
> + join.joinQual = (Expr) joinQual.clone();
> + }
> {code}
> After fix, we need to get the following result.
> {code}
> default> select * from t natural join s;
> Progress: 100%, response time: 0.293 sec
> a, a
> -------------------------------
> 1, 1
> (1 rows, 0.293 sec, 4 B selected)
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)