From 5677154cd1530ec05f2281fd21cd2a5cb67386ea Mon Sep 17 00:00:00 2001 From: terry Date: Thu, 4 Feb 2016 11:12:08 +0800 Subject: [PATCH 04/10] =?UTF-8?q?BIGVIZ-2098,=E5=A4=9A=E4=B8=AAJOIN=E5=87=BA?= =?UTF-8?q?=E7=8E=B0NPE=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: terry --- .../main/java/org/apache/kylin/query/relnode/OLAPJoinRel.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/query/src/main/java/org/apache/kylin/query/relnode/OLAPJoinRel.java b/query/src/main/java/org/apache/kylin/query/relnode/OLAPJoinRel.java index 681e77f..e88658e 100644 --- a/query/src/main/java/org/apache/kylin/query/relnode/OLAPJoinRel.java +++ b/query/src/main/java/org/apache/kylin/query/relnode/OLAPJoinRel.java @@ -117,15 +117,19 @@ public class OLAPJoinRel extends EnumerableJoin implements OLAPRel { // as we keep the first table as fact table, we need to visit from left // to right implementor.visitChild(this.left, this); - if (this.context != implementor.getContext() || ((OLAPRel) this.left).hasSubQuery()) { + if (this.context != implementor.getContext()) { this.hasSubQuery = true; implementor.freeContext(); } implementor.visitChild(this.right, this); - if (this.context != implementor.getContext() || ((OLAPRel) this.right).hasSubQuery()) { + if (this.context != implementor.getContext()) { this.hasSubQuery = true; implementor.freeContext(); } + + if(((OLAPRel) this.left).hasSubQuery() || ((OLAPRel) this.right).hasSubQuery()) { + this.hasSubQuery = true; + } this.columnRowType = buildColumnRowType(); if (isTopJoin) { @@ -302,3 +306,4 @@ public class OLAPJoinRel extends EnumerableJoin implements OLAPRel { return oldTraitSet; } } + -- 1.7.10.4