fe/src/main/java/com/cloudera/impala/analysis/WithClause.java
/**
   * Enforces scoping rules, and ensures that there are no recursive table references.
   * Nested WITH clauses should call this method instead of analyze().
   */
Enforces scoping rules, and ensures that there are no recursive table references.
Nested WITH clauses should call this method instead of analyze().
Enforces scoping rules and ensures that there are no recursive table references . Nested WITH clauses should call this method instead of analyze () .
private void analyzeWithClause(Analyzer analyzer) throws AnalysisException,
      AuthorizationException {
    unresolvedTableRefs_.clear();
    analyzeWithClause(analyzer, this, unresolvedTableRefs_);
    for (BaseTableRef baseTblRef: unresolvedTableRefs_) {
      baseTblRef.disableWithViewReplacement();
    }
    for (ViewRef view: views_) {
      analyzer.registerWithClauseView(view);
    }
    this.analyzer_ = analyzer;
  }
private void analyzeWithClause ( Analyzer analyzer ) throws AnalysisException , AuthorizationException { unresolvedTableRefs_ . clear ( ) ; analyzeWithClause ( analyzer , this , unresolvedTableRefs_ ) ; for ( BaseTableRef baseTblRef : unresolvedTableRefs_ ) { baseTblRef . disableWithViewReplacement ( ) ; } for ( ViewRef view : views_ ) { analyzer . registerWithClauseView ( view ) ; } this . analyzer_ = analyzer ; }
Enforces scoping rules, and ensures that there are no recursive table references.
Enforces scoping rules and ensures that there are no recursive table references .
// The remaining unresolved tables must refer to base tables in the catalog. // We explicitly disable view matching for them to simplify later view substitution. // Register all views in analyzer. After this step we will "blindly" replace // BaseTableRefs with view definitions from this WITH clause in // Analyser.substituteBaseTablesWithMatchingViews().