hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gunt...@apache.org
Subject svn commit: r1538509 - /hive/branches/tez/ql/src/java/org/apache/hadoop/hive/ql/exec/Operator.java
Date Mon, 04 Nov 2013 05:35:36 GMT
Author: gunther
Date: Mon Nov  4 05:35:36 2013
New Revision: 1538509

URL: http://svn.apache.org/r1538509
Log:
HIVE-5736: Fix assertion in Operator.java (Gunther Hagleitner)

Modified:
    hive/branches/tez/ql/src/java/org/apache/hadoop/hive/ql/exec/Operator.java

Modified: hive/branches/tez/ql/src/java/org/apache/hadoop/hive/ql/exec/Operator.java
URL: http://svn.apache.org/viewvc/hive/branches/tez/ql/src/java/org/apache/hadoop/hive/ql/exec/Operator.java?rev=1538509&r1=1538508&r2=1538509&view=diff
==============================================================================
--- hive/branches/tez/ql/src/java/org/apache/hadoop/hive/ql/exec/Operator.java (original)
+++ hive/branches/tez/ql/src/java/org/apache/hadoop/hive/ql/exec/Operator.java Mon Nov  4
05:35:36 2013
@@ -385,6 +385,14 @@ public abstract class Operator<T extends
     passExecContext(this.execContext);
 
     initializeOp(hconf);
+
+    // sanity check
+    if (childOperatorsArray == null
+        && !(childOperators == null || childOperators.isEmpty())) {
+      throw new HiveException(
+          "Internal Hive error during operator initialization.");
+    }
+
     LOG.info("Initialization Done " + id + " " + getName());
   }
 
@@ -780,7 +788,7 @@ public abstract class Operator<T extends
     Operator<? extends OperatorDesc> currOp = this;
     for (int i = 0; i < depth; i++) {
       // If there are more than 1 children at any level, don't do anything
-      if ((currOp.getChildOperators() == null) || (currOp.getChildOperators().isEmpty())
|| 
+      if ((currOp.getChildOperators() == null) || (currOp.getChildOperators().isEmpty())
||
           (currOp.getChildOperators().size() > 1)) {
         return false;
       }
@@ -844,11 +852,6 @@ public abstract class Operator<T extends
     // System.out.println("" + this.getClass() + ">> " +
     // ObjectInspectorUtils.getObjectInspectorName(rowInspector));
 
-    if (childOperatorsArray == null && childOperators != null) {
-      throw new HiveException(
-          "Internal Hive error during operator initialization.");
-    }
-
     if ((childOperatorsArray == null) || (getDone())) {
       return;
     }



Mime
View raw message