fe/src/main/java/com/cloudera/impala/analysis/WithClause.java
/**
   * Analyzes stmt's WITH clause if it has one, and returns the WITH clause's
   * new analyzer. Otherwise, returns analyzer.
   */
Analyzes stmt's WITH clause if it has one, and returns the WITH clause's
new analyzer. Otherwise, returns analyzer.
Analyzes stmt ' s WITH clause if it has one and returns the WITH clause ' s new analyzer . Otherwise returns analyzer .
private Analyzer pushScope(Analyzer analyzer, QueryStmt stmt)
      throws AnalysisException, AuthorizationException {
    if (stmt.hasWithClause()) {
      Analyzer newAnalyzer = new Analyzer(analyzer, analyzer.getUser());
      stmt.getWithClause().analyzeWithClause(newAnalyzer);
      return newAnalyzer;
    }
    return analyzer;
  }
private Analyzer pushScope ( Analyzer analyzer , QueryStmt stmt ) throws AnalysisException , AuthorizationException { if ( stmt . hasWithClause ( ) ) { Analyzer newAnalyzer = new Analyzer ( analyzer , analyzer . getUser ( ) ) ; stmt . getWithClause ( ) . analyzeWithClause ( newAnalyzer ) ; return newAnalyzer ; } return analyzer ; }
Analyzes stmt's WITH clause if it has one, and returns the WITH clause's
 new analyzer.
Analyzes stmt ' s WITH clause if it has one and returns the WITH clause ' s new analyzer .
// Create a new analyzer to establish a new scope. // Since withClause was not set we remain in the same scope.