Index: ql/src/java/org/apache/hadoop/hive/ql/parse/TezCompiler.java =================================================================== --- ql/src/java/org/apache/hadoop/hive/ql/parse/TezCompiler.java (revision 1637976) +++ ql/src/java/org/apache/hadoop/hive/ql/parse/TezCompiler.java (working copy) @@ -150,6 +150,7 @@ LOG.info("Found cycle in operator plan..."); cycleFree = false; removeEventOperator(component); + break; } } LOG.info("Cycle free: " + cycleFree); @@ -227,7 +228,7 @@ for (Operator child : children) { if (!indexes.containsKey(child)) { connect(child, index, nodes, indexes, lowLinks, components); - lowLinks.put(child, Math.min(lowLinks.get(o), lowLinks.get(child))); + lowLinks.put(o, Math.min(lowLinks.get(o), lowLinks.get(child))); } else if (nodes.contains(child)) { lowLinks.put(o, Math.min(lowLinks.get(o), indexes.get(child))); }