hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hashut...@apache.org
Subject svn commit: r1635595 - /hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java
Date Thu, 30 Oct 2014 19:25:44 GMT
Author: hashutosh
Date: Thu Oct 30 19:25:44 2014
New Revision: 1635595

URL: http://svn.apache.org/r1635595
Log:
HIVE-8653 : CBO: Push Semi Join through, Project/Filter/Join (John Pullokkaran via Ashutosh
Chauhan)

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

Modified: hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java?rev=1635595&r1=1635594&r2=1635595&view=diff
==============================================================================
--- hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java (original)
+++ hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java Thu Oct 30
19:25:44 2014
@@ -259,6 +259,9 @@ import org.eigenbase.rel.rules.LoptOptim
 import org.eigenbase.rel.rules.MergeFilterRule;
 import org.eigenbase.rel.rules.PushFilterPastProjectRule;
 import org.eigenbase.rel.rules.PushFilterPastSetOpRule;
+import org.eigenbase.rel.rules.PushSemiJoinPastFilterRule;
+import org.eigenbase.rel.rules.PushSemiJoinPastJoinRule;
+import org.eigenbase.rel.rules.PushSemiJoinPastProjectRule;
 import org.eigenbase.rel.rules.SemiJoinRel;
 import org.eigenbase.rel.rules.TransitivePredicatesOnJoinRule;
 import org.eigenbase.relopt.RelOptCluster;
@@ -12644,7 +12647,15 @@ public class SemanticAnalyzer extends Ba
       // TODO: Decorelation of subquery should be done before attempting
       // Partition Pruning; otherwise Expression evaluation may try to execute
       // corelated sub query.
-      basePlan = hepPlan(basePlan, true, mdProvider, new PushFilterPastProjectRule(
+
+      // Push Down Semi Joins
+      basePlan = hepPlan(basePlan, true, mdProvider,
+          PushSemiJoinPastJoinRule.INSTANCE,
+          new PushSemiJoinPastFilterRule(HiveFilterRel.DEFAULT_FILTER_FACTORY),
+          new PushSemiJoinPastProjectRule(HiveProjectRel.DEFAULT_PROJECT_FACTORY));
+
+      basePlan = hepPlan(basePlan, true, mdProvider,
+          new PushFilterPastProjectRule(
           FilterRelBase.class, HiveFilterRel.DEFAULT_FILTER_FACTORY, HiveProjectRel.class,
           HiveProjectRel.DEFAULT_PROJECT_FACTORY), new PushFilterPastSetOpRule(
           HiveFilterRel.DEFAULT_FILTER_FACTORY), new MergeFilterRule(



Mime
View raw message