You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by gu...@apache.org on 2013/11/04 06:35:36 UTC
svn commit: r1538509 -
/hive/branches/tez/ql/src/java/org/apache/hadoop/hive/ql/exec/Operator.java
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;
}