kylin-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From liy...@apache.org
Subject [15/35] kylin git commit: KYLIN-2521 upgrade calcite to 1.12
Date Sat, 08 Apr 2017 11:55:57 GMT
http://git-wip-us.apache.org/repos/asf/kylin/blob/19d5b3de/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 0e41dcf..40ccd0c 100644
--- a/pom.xml
+++ b/pom.xml
@@ -66,7 +66,7 @@
         <!-- <reflections.version>0.9.10</reflections.version> -->
 
         <!-- Calcite Version -->
-        <calcite.version>1.11.0</calcite.version>
+        <calcite.version>1.12.0</calcite.version>
         <avatica.version>1.9.0</avatica.version>
 
         <!-- Hadoop Common deps, keep compatible with hadoop2.version -->

http://git-wip-us.apache.org/repos/asf/kylin/blob/19d5b3de/query/src/main/java/org/apache/kylin/query/optrule/AggregateMultipleExpandRule.java
----------------------------------------------------------------------
diff --git a/query/src/main/java/org/apache/kylin/query/optrule/AggregateMultipleExpandRule.java
b/query/src/main/java/org/apache/kylin/query/optrule/AggregateMultipleExpandRule.java
index 03a0674..cdd6004 100644
--- a/query/src/main/java/org/apache/kylin/query/optrule/AggregateMultipleExpandRule.java
+++ b/query/src/main/java/org/apache/kylin/query/optrule/AggregateMultipleExpandRule.java
@@ -100,7 +100,7 @@ public class AggregateMultipleExpandRule extends RelOptRule {
                     rexNodes.add(rexBuilder.makeInputRef(type, index++));
                     groupKey = groupKeyIter.next();
                 } else {
-                    rexNodes.add(rexBuilder.makeNullLiteral(type.getSqlTypeName()));
+                    rexNodes.add(rexBuilder.makeNullLiteral(type));
                 }
             }
 

http://git-wip-us.apache.org/repos/asf/kylin/blob/19d5b3de/query/src/main/java/org/apache/kylin/query/relnode/OLAPTableScan.java
----------------------------------------------------------------------
diff --git a/query/src/main/java/org/apache/kylin/query/relnode/OLAPTableScan.java b/query/src/main/java/org/apache/kylin/query/relnode/OLAPTableScan.java
index f7877be..35dd73f 100644
--- a/query/src/main/java/org/apache/kylin/query/relnode/OLAPTableScan.java
+++ b/query/src/main/java/org/apache/kylin/query/relnode/OLAPTableScan.java
@@ -175,7 +175,8 @@ public class OLAPTableScan extends TableScan implements OLAPRel, EnumerableRel
{
         planner.removeRule(JoinUnionTransposeRule.RIGHT_UNION);
         planner.removeRule(AggregateUnionTransposeRule.INSTANCE);
         planner.removeRule(DateRangeRules.FILTER_INSTANCE);
-        planner.removeRule(SemiJoinRule.INSTANCE);
+        planner.removeRule(SemiJoinRule.JOIN);
+        planner.removeRule(SemiJoinRule.PROJECT);
         // distinct count will be split into a separated query that is joined with the left
query
         planner.removeRule(AggregateExpandDistinctAggregatesRule.INSTANCE);
 

http://git-wip-us.apache.org/repos/asf/kylin/blob/19d5b3de/query/src/main/java/org/apache/kylin/query/relnode/OLAPToEnumerableConverter.java
----------------------------------------------------------------------
diff --git a/query/src/main/java/org/apache/kylin/query/relnode/OLAPToEnumerableConverter.java
b/query/src/main/java/org/apache/kylin/query/relnode/OLAPToEnumerableConverter.java
index 0468c91..4a49d04 100644
--- a/query/src/main/java/org/apache/kylin/query/relnode/OLAPToEnumerableConverter.java
+++ b/query/src/main/java/org/apache/kylin/query/relnode/OLAPToEnumerableConverter.java
@@ -74,6 +74,12 @@ public class OLAPToEnumerableConverter extends ConverterImpl implements
Enumerab
 
     @Override
     public Result implement(EnumerableRelImplementor enumImplementor, Prefer pref) {
+        if (System.getProperty("calcite.debug") != null) {
+            String dumpPlan = RelOptUtil.dumpPlan("", this, false, SqlExplainLevel.DIGEST_ATTRIBUTES);
+            System.out.println("EXECUTION PLAN BEFORE REWRITE");
+            System.out.println(dumpPlan);
+        }
+        
         // post-order travel children
         OLAPRel.OLAPImplementor olapImplementor = new OLAPRel.OLAPImplementor();
         olapImplementor.visitChild(getInput(), this);


Mime
View raw message