diff --git ql/src/java/org/apache/hadoop/hive/ql/optimizer/ConstantPropagate.java ql/src/java/org/apache/hadoop/hive/ql/optimizer/ConstantPropagate.java index 47d9ec7367..a040d7e8c7 100644 --- ql/src/java/org/apache/hadoop/hive/ql/optimizer/ConstantPropagate.java +++ ql/src/java/org/apache/hadoop/hive/ql/optimizer/ConstantPropagate.java @@ -57,7 +57,7 @@ * some constants of its parameters. * * 3. Propagate expression: if the expression is an assignment like column=constant, the expression - * will be propagate to parents to see if further folding operation is possible. + * will be propagate to children to see if further folding operation is possible. */ public class ConstantPropagate extends Transform { @@ -147,7 +147,7 @@ protected void walk(Node nd) throws SemanticException { || getDispatchedList().containsAll(parents)) { opStack.push(nd); - // all children are done or no need to walk the children + // all parents are done or no need to walk the parents dispatch(nd, opStack); opStack.pop(); } else { @@ -157,7 +157,7 @@ protected void walk(Node nd) throws SemanticException { return; } - // move all the children to the front of queue + // move all the children to the end of queue List children = nd.getChildren(); if (children != null) { toWalk.removeAll(children);