Impala
Impalaistheopensource,nativeanalyticdatabaseforApacheHadoop.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
com.cloudera.impala.analysis.WithClause Class Reference
Inheritance diagram for com.cloudera.impala.analysis.WithClause:
Collaboration diagram for com.cloudera.impala.analysis.WithClause:

Public Member Functions

 WithClause (ArrayList< View > views)
 
 WithClause (WithClause other)
 
void analyze (Analyzer analyzer) throws AnalysisException
 
WithClause clone ()
 
String toSql ()
 

Private Attributes

final ArrayList< Viewviews_
 

Detailed Description

Representation of the WITH clause that may appear before a query statement or insert statement. A WITH clause contains a list of named view definitions that may be referenced in the query statement that follows it.

Scoping rules: A WITH-clause view is visible inside the query statement that it belongs to. This includes inline views and nested WITH clauses inside the query statement.

Each WITH clause establishes a new analysis scope. A WITH-clause view definition may refer to views from the same WITH-clause appearing to its left, and to all WITH-clause views from outer scopes.

References to WITH-clause views are resolved inside out, i.e., a match is found by first looking in the current scope and then in the enclosing scope(s).

Views defined within the same WITH-clause may not use the same alias.

Definition at line 45 of file WithClause.java.

Constructor & Destructor Documentation

com.cloudera.impala.analysis.WithClause.WithClause ( ArrayList< View views)
inline
com.cloudera.impala.analysis.WithClause.WithClause ( WithClause  other)
inline

Member Function Documentation

void com.cloudera.impala.analysis.WithClause.analyze ( Analyzer  analyzer) throws AnalysisException
inline

Analyzes all views and registers them with the analyzer. Enforces scoping rules. All local views registered with the analyzer are have QueryStmts with resolved TableRefs to simplify the analysis of view references.

Implements com.cloudera.impala.analysis.ParseNode.

Definition at line 71 of file WithClause.java.

References com.cloudera.impala.analysis.Analyzer.getAccessEvents(), com.cloudera.impala.analysis.Analyzer.getLocalViews(), com.cloudera.impala.analysis.Analyzer.getMissingTbls(), com.cloudera.impala.analysis.Analyzer.getPrivilegeReqs(), com.cloudera.impala.analysis.Analyzer.setIsExplain(), and com.cloudera.impala.analysis.WithClause.views_.

WithClause com.cloudera.impala.analysis.WithClause.clone ( )
inline
String com.cloudera.impala.analysis.WithClause.toSql ( )
inline
Returns
SQL syntax corresponding to this node.

Implements com.cloudera.impala.analysis.ParseNode.

Definition at line 109 of file WithClause.java.

References com.cloudera.impala.analysis.WithClause.views_.

Member Data Documentation

final ArrayList<View> com.cloudera.impala.analysis.WithClause.views_
private

The documentation for this class was generated from the following file: