hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hashut...@apache.org
Subject svn commit: r1650692 - /hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/CalcitePlanner.java
Date Fri, 09 Jan 2015 22:56:17 GMT
Author: hashutosh
Date: Fri Jan  9 22:56:17 2015
New Revision: 1650692

URL: http://svn.apache.org/r1650692
Log:
HIVE-9318 : Add UnionMerge rule on cbo path (Ashutosh Chauhan via John Pullokkaran)

Modified:
    hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/CalcitePlanner.java

Modified: hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/CalcitePlanner.java
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/CalcitePlanner.java?rev=1650692&r1=1650691&r2=1650692&view=diff
==============================================================================
--- hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/CalcitePlanner.java (original)
+++ hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/CalcitePlanner.java Fri Jan  9
22:56:17 2015
@@ -73,6 +73,7 @@ import org.apache.calcite.rel.rules.Redu
 import org.apache.calcite.rel.rules.SemiJoinFilterTransposeRule;
 import org.apache.calcite.rel.rules.SemiJoinJoinTransposeRule;
 import org.apache.calcite.rel.rules.SemiJoinProjectTransposeRule;
+import org.apache.calcite.rel.rules.UnionMergeRule;
 import org.apache.calcite.rel.type.RelDataType;
 import org.apache.calcite.rel.type.RelDataTypeFactory;
 import org.apache.calcite.rel.type.RelDataTypeField;
@@ -715,8 +716,9 @@ public class CalcitePlanner extends Sema
       hepPgmBldr.addRuleInstance(ReduceExpressionsRule.JOIN_INSTANCE);
       hepPgmBldr.addRuleInstance(ReduceExpressionsRule.FILTER_INSTANCE);
       hepPgmBldr.addRuleInstance(ReduceExpressionsRule.PROJECT_INSTANCE);
-
       hepPgmBldr.addRuleInstance(ProjectRemoveRule.INSTANCE);
+      hepPgmBldr.addRuleInstance(UnionMergeRule.INSTANCE);
+
       hepPgm = hepPgmBldr.build();
       HepPlanner hepPlanner = new HepPlanner(hepPgm);
 
@@ -1817,7 +1819,7 @@ public class CalcitePlanner extends Sema
         relToHiveColNameCalcitePosMap.put(gbRel,
             buildHiveToCalciteColumnMap(groupByOutputRowResolver, gbRel));
         this.relToHiveRR.put(gbRel, groupByOutputRowResolver);
-        
+
         // 6. If GroupingSets, Cube, Rollup were used, we account grouping__id.
         // Further, we insert a project operator on top to remove the grouping
         // boolean associated to each column in Calcite; this will avoid



Mime
View raw message