hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gunt...@apache.org
Subject svn commit: r1633992 - in /hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/optimizer/optiq: rules/HivePushFilterPastJoinRule.java stats/HiveRelMdRowCount.java
Date Fri, 24 Oct 2014 03:20:43 GMT
Author: gunther
Date: Fri Oct 24 03:20:43 2014
New Revision: 1633992

URL: http://svn.apache.org/r1633992
Log:
Revert HIVE-8582: Causes build failures (Gunther Hagleitner)

Modified:
    hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/optimizer/optiq/rules/HivePushFilterPastJoinRule.java
    hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/optimizer/optiq/stats/HiveRelMdRowCount.java

Modified: hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/optimizer/optiq/rules/HivePushFilterPastJoinRule.java
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/optimizer/optiq/rules/HivePushFilterPastJoinRule.java?rev=1633992&r1=1633991&r2=1633992&view=diff
==============================================================================
--- hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/optimizer/optiq/rules/HivePushFilterPastJoinRule.java
(original)
+++ hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/optimizer/optiq/rules/HivePushFilterPastJoinRule.java
Fri Oct 24 03:20:43 2014
@@ -25,13 +25,13 @@ import org.apache.hadoop.hive.ql.optimiz
 import org.apache.hadoop.hive.ql.optimizer.optiq.reloperators.HiveProjectRel;
 import org.eigenbase.rel.FilterRelBase;
 import org.eigenbase.rel.JoinRelBase;
-import org.eigenbase.rel.JoinRelType;
 import org.eigenbase.rel.RelFactories;
 import org.eigenbase.rel.rules.PushFilterPastJoinRule;
 import org.eigenbase.relopt.RelOptRule;
 import org.eigenbase.relopt.RelOptRuleCall;
 import org.eigenbase.relopt.RelOptRuleOperand;
 import org.eigenbase.relopt.RelOptUtil.InputFinder;
+import org.eigenbase.rex.RexBuilder;
 import org.eigenbase.rex.RexCall;
 import org.eigenbase.rex.RexNode;
 import org.eigenbase.sql.SqlKind;
@@ -96,33 +96,30 @@ public abstract class HivePushFilterPast
 	 */
 	@Override
 	protected void validateJoinFilters(List<RexNode> aboveFilters,
-			List<RexNode> joinFilters, JoinRelBase join, JoinRelType joinType) {
-		if (joinType.equals(JoinRelType.INNER)) {
-			ListIterator<RexNode> filterIter = joinFilters.listIterator();
-			while (filterIter.hasNext()) {
-				RexNode exp = filterIter.next();
-				if (exp instanceof RexCall) {
-					RexCall c = (RexCall) exp;
-					if (c.getOperator().getKind() == SqlKind.EQUALS) {
-						boolean validHiveJoinFilter = true;
-						for (RexNode rn : c.getOperands()) {
-							// NOTE: Hive dis-allows projections from both left
-							// &
-							// right side
-							// of join condition. Example: Hive disallows
-							// (r1.x=r2.x)=(r1.y=r2.y) on join condition.
-							if (filterRefersToBothSidesOfJoin(rn, join)) {
-								validHiveJoinFilter = false;
-								break;
-							}
+			List<RexNode> joinFilters, JoinRelBase join) {
+		ListIterator<RexNode> filterIter = joinFilters.listIterator();
+		while (filterIter.hasNext()) {
+			RexNode exp = filterIter.next();
+			if (exp instanceof RexCall) {
+				RexCall c = (RexCall) exp;
+				if (c.getOperator().getKind() == SqlKind.EQUALS) {
+					boolean validHiveJoinFilter = true;
+					for (RexNode rn : c.getOperands()) {
+						// NOTE: Hive dis-allows projections from both left &
+						// right side
+						// of join condition. Example: Hive disallows
+						// (r1.x=r2.x)=(r1.y=r2.y) on join condition.
+						if (filterRefersToBothSidesOfJoin(rn, join)) {
+							validHiveJoinFilter = false;
+							break;
 						}
-						if (validHiveJoinFilter)
-							continue;
 					}
+					if (validHiveJoinFilter)
+						continue;
 				}
-				aboveFilters.add(exp);
-				filterIter.remove();
 			}
+			aboveFilters.add(exp);
+			filterIter.remove();
 		}
 	}
 

Modified: hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/optimizer/optiq/stats/HiveRelMdRowCount.java
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/optimizer/optiq/stats/HiveRelMdRowCount.java?rev=1633992&r1=1633991&r2=1633992&view=diff
==============================================================================
--- hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/optimizer/optiq/stats/HiveRelMdRowCount.java
(original)
+++ hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/optimizer/optiq/stats/HiveRelMdRowCount.java
Fri Oct 24 03:20:43 2014
@@ -192,7 +192,7 @@ public class HiveRelMdRowCount extends R
     RelOptUtil.classifyFilters(joinRel, joinFilters, joinRel.getJoinType(),
         false, !joinRel.getJoinType().generatesNullsOnRight(), !joinRel
             .getJoinType().generatesNullsOnLeft(), joinFilters, leftFilters,
-        rightFilters);
+        rightFilters, joinTypeHolder, false);
 
     Pair<Integer, Integer> joinCols = canHandleJoin(joinRel, leftFilters,
         rightFilters, joinFilters);



Mime
View raw message