private void gatherCTEReferences(QBExpr qbexpr, CTEClause parent,
                                   Map<String, CTEClause> materializationAliasToCTEs) throws HiveException {
    if (qbexpr.getOpcode() == QBExpr.Opcode.NULLOP) {
      gatherCTEReferences(qbexpr.getQB(), parent, materializationAliasToCTEs);
    } else {
      gatherCTEReferences(qbexpr.getQBExpr1(), parent, materializationAliasToCTEs);
      gatherCTEReferences(qbexpr.getQBExpr2(), parent, materializationAliasToCTEs);
    }
  }
This is phase1 of supporting specifying schema in insert statement
insert into foo(z,y) select a,b from bar;
@see #handleInsertStatementSpec(java.util.List, String, RowResolver, QB, ASTNode)
@throws SemanticException
ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java