Impala
Impalaistheopensource,nativeanalyticdatabaseforApacheHadoop.
|
Protected Member Functions | |
TableRef (TableRef other) | |
void | setJoinAttrs (TableRef other) |
String | tableRefToSql () |
Protected Attributes | |
List< String > | rawPath_ |
Path | resolvedPath_ |
String[] | aliases_ |
boolean | hasExplicitAlias_ |
JoinOperator | joinOp_ |
ArrayList< String > | joinHints_ |
Expr | onClause_ |
List< String > | usingColNames_ |
TableRef | leftTblRef_ |
boolean | isAnalyzed_ |
List< TupleId > | onClauseTupleIds_ = Lists.newArrayList() |
TupleDescriptor | desc_ |
Private Member Functions | |
void | analyzeJoinHints (Analyzer analyzer) throws AnalysisException |
Private Attributes | |
boolean | isBroadcastJoin_ |
boolean | isPartitionedJoin_ |
Superclass of all table references, including references to views, base tables (Hdfs, HBase or DataSource tables), and nested collections. Contains the join specification. An instance of a TableRef (and not a subclass thereof) represents an unresolved table reference that must be resolved during analysis. All resolved table references are subclasses of TableRef. TODO: Rename this class to CollectionRef and re-consider the naming of all subclasses.
Definition at line 45 of file TableRef.java.
|
inline |
Definition at line 85 of file TableRef.java.
References com.cloudera.impala.analysis.TableRef.aliases_, com.cloudera.impala.analysis.TableRef.hasExplicitAlias_, com.cloudera.impala.analysis.TableRef.isAnalyzed_, path(), and com.cloudera.impala.analysis.TableRef.rawPath_.
Referenced by com.cloudera.impala.analysis.TableRef.clone().
|
inlineprotected |
C'tor for cloning.
Definition at line 100 of file TableRef.java.
References com.cloudera.impala.analysis.Expr.clone(), com.cloudera.impala.analysis.TableRef.joinHints_, com.cloudera.impala.analysis.TableRef.onClause_, and com.cloudera.impala.analysis.TableRef.usingColNames_.
|
inline |
Perform semantic analysis of node and all of its children. Throws exception if any errors found.
analyzer |
AnalysisException |
Implements com.cloudera.impala.analysis.ParseNode.
Definition at line 117 of file TableRef.java.
References com.cloudera.impala.catalog.Table.getFullName(), com.cloudera.impala.analysis.TableRef.getPrivilegeRequirement(), com.cloudera.impala.analysis.Path.getRootTable(), com.cloudera.impala.analysis.TableName.getTbl(), com.cloudera.impala.catalog.View.isLocalView(), com.cloudera.impala.analysis.TableRef.rawPath_, com.cloudera.impala.analysis.TableRef.resolvedPath_, and com.cloudera.impala.analysis.Path.PathType.TABLE_REF.
|
inline |
Analyze the join clause. The join clause can only be analyzed after the left table has been analyzed and the TupleDescriptor (desc) of this table has been created.
Definition at line 339 of file TableRef.java.
References com.cloudera.impala.analysis.TableRef.analyzeJoinHints(), com.cloudera.impala.analysis.Path.createRawPath(), com.cloudera.impala.analysis.JoinOperator.CROSS_JOIN, com.cloudera.impala.analysis.TableRef.desc_, com.cloudera.impala.analysis.JoinOperator.FULL_OUTER_JOIN, com.cloudera.impala.analysis.Expr.getConjuncts(), com.cloudera.impala.analysis.TableRef.getDesc(), com.cloudera.impala.analysis.TableRef.getId(), com.cloudera.impala.analysis.TableRef.getJoinOp(), com.cloudera.impala.analysis.TableRef.getUniqueAlias(), com.cloudera.impala.analysis.Expr.isAggregatePredicate(), com.cloudera.impala.analysis.TableRef.isBroadcastJoin_, com.cloudera.impala.analysis.TableRef.isChildRef(), com.cloudera.impala.analysis.TableRef.joinOp_, com.cloudera.impala.analysis.JoinOperator.LEFT_ANTI_JOIN, com.cloudera.impala.analysis.JoinOperator.LEFT_OUTER_JOIN, com.cloudera.impala.analysis.JoinOperator.LEFT_SEMI_JOIN, com.cloudera.impala.analysis.TableRef.leftTblRef_, com.cloudera.impala.analysis.JoinOperator.NULL_AWARE_LEFT_ANTI_JOIN, com.cloudera.impala.analysis.TableRef.onClause_, com.cloudera.impala.analysis.Path.resolve(), com.cloudera.impala.analysis.JoinOperator.RIGHT_ANTI_JOIN, com.cloudera.impala.analysis.JoinOperator.RIGHT_OUTER_JOIN, com.cloudera.impala.analysis.JoinOperator.RIGHT_SEMI_JOIN, com.cloudera.impala.analysis.TableRef.toSql(), com.cloudera.impala.analysis.JoinOperator.toString(), and com.cloudera.impala.analysis.TableRef.usingColNames_.
Referenced by com.cloudera.impala.analysis.BaseTableRef.analyze(), com.cloudera.impala.analysis.CollectionTableRef.analyze(), and com.cloudera.impala.analysis.InlineViewRef.analyze().
|
inlineprivate |
Definition at line 303 of file TableRef.java.
References com.cloudera.impala.analysis.JoinOperator.CROSS_JOIN, com.cloudera.impala.analysis.JoinOperator.FULL_OUTER_JOIN, com.cloudera.impala.analysis.TableRef.isBroadcastJoin_, com.cloudera.impala.analysis.TableRef.isPartitionedJoin_, com.cloudera.impala.analysis.TableRef.joinHints_, com.cloudera.impala.analysis.TableRef.joinOp_, com.cloudera.impala.analysis.JoinOperator.RIGHT_ANTI_JOIN, com.cloudera.impala.analysis.JoinOperator.RIGHT_OUTER_JOIN, com.cloudera.impala.analysis.JoinOperator.RIGHT_SEMI_JOIN, and com.cloudera.impala.analysis.JoinOperator.toString().
Referenced by com.cloudera.impala.analysis.TableRef.analyzeJoin().
|
inline |
Definition at line 502 of file TableRef.java.
References com.cloudera.impala.analysis.TableRef.TableRef().
|
inline |
Creates and returns a empty TupleDescriptor registered with the analyzer based on the resolvedPath_. This method is called from the analyzer when registering this table reference.
Definition at line 169 of file TableRef.java.
References com.cloudera.impala.analysis.TableRef.getUniqueAlias(), and com.cloudera.impala.analysis.TableRef.resolvedPath_.
|
inline |
Returns all legal aliases of this table ref.
Definition at line 205 of file TableRef.java.
References com.cloudera.impala.analysis.TableRef.aliases_.
|
inline |
Return the list of tuple ids materialized by the full sequence of table refs up to this one.
Definition at line 278 of file TableRef.java.
References com.cloudera.impala.analysis.TableRef.getMaterializedTupleIds(), and com.cloudera.impala.analysis.TableRef.leftTblRef_.
|
inline |
Return the list of tuple ids of the full sequence of table refs up to this one.
Definition at line 292 of file TableRef.java.
References com.cloudera.impala.analysis.TableRef.isAnalyzed_, and com.cloudera.impala.analysis.TableRef.leftTblRef_.
Referenced by com.cloudera.impala.analysis.Analyzer.canEvalPredicate().
|
inline |
This method should only be called after the TableRef has been analyzed.
Definition at line 250 of file TableRef.java.
References com.cloudera.impala.analysis.TableRef.desc_, and com.cloudera.impala.analysis.TableRef.isAnalyzed_.
Referenced by com.cloudera.impala.analysis.TableRef.analyzeJoin(), com.cloudera.impala.planner.SingleNodePlanner.getHashLookupJoinConjuncts(), and com.cloudera.impala.analysis.StmtRewriter.mergeExpr().
|
inline |
Returns the explicit alias if this table ref has one, null otherwise.
Definition at line 224 of file TableRef.java.
References com.cloudera.impala.analysis.TableRef.getUniqueAlias(), and com.cloudera.impala.analysis.TableRef.hasExplicitAlias().
Referenced by com.cloudera.impala.analysis.InlineViewRef.InlineViewRef(), com.cloudera.impala.analysis.BaseTableRef.tableRefToSql(), com.cloudera.impala.analysis.InlineViewRef.tableRefToSql(), and com.cloudera.impala.analysis.TableRef.tableRefToSql().
|
inline |
This method should only be called after the TableRef has been analyzed.
Definition at line 260 of file TableRef.java.
References com.cloudera.impala.analysis.TableRef.desc_, and com.cloudera.impala.analysis.TableRef.isAnalyzed_.
Referenced by com.cloudera.impala.analysis.TableRef.analyzeJoin(), com.cloudera.impala.planner.SingleNodePlanner.migrateConjunctsToInlineView(), and com.cloudera.impala.analysis.Analyzer.ValueTransferGraph.partitionValueTransfers().
|
inline |
Definition at line 233 of file TableRef.java.
References com.cloudera.impala.analysis.TableRef.joinHints_.
|
inline |
Definition at line 188 of file TableRef.java.
References com.cloudera.impala.analysis.JoinOperator.INNER_JOIN, and com.cloudera.impala.analysis.TableRef.joinOp_.
Referenced by com.cloudera.impala.analysis.TableRef.analyzeJoin(), com.cloudera.impala.analysis.Analyzer.canEvalPredicate(), com.cloudera.impala.planner.SingleNodePlanner.createJoinPlan(), com.cloudera.impala.analysis.Analyzer.getAntiJoinRef(), com.cloudera.impala.analysis.Analyzer.getBoundPredicates(), com.cloudera.impala.analysis.Analyzer.getEqJoinConjuncts(), com.cloudera.impala.analysis.TableRef.invertJoin(), com.cloudera.impala.analysis.Analyzer.ValueTransferGraph.partitionValueTransfers(), com.cloudera.impala.analysis.Analyzer.registerOnClauseConjuncts(), and com.cloudera.impala.analysis.StmtRewriter.replaceUnqualifiedStarItems().
|
inline |
Definition at line 239 of file TableRef.java.
References com.cloudera.impala.analysis.TableRef.leftTblRef_.
Referenced by com.cloudera.impala.planner.SingleNodePlanner.createJoinPlan().
|
inline |
Definition at line 267 of file TableRef.java.
References com.cloudera.impala.analysis.TableRef.desc_, and com.cloudera.impala.analysis.TableRef.isAnalyzed_.
Referenced by com.cloudera.impala.analysis.TableRef.getAllMaterializedTupleIds().
|
inline |
Definition at line 234 of file TableRef.java.
References com.cloudera.impala.analysis.TableRef.onClause_.
|
inline |
Definition at line 244 of file TableRef.java.
References com.cloudera.impala.analysis.TableRef.onClauseTupleIds_.
|
inline |
Definition at line 199 of file TableRef.java.
References com.cloudera.impala.analysis.TableRef.rawPath_.
|
inline |
Gets the privilege requirement. This is always SELECT for TableRefs.
Definition at line 499 of file TableRef.java.
References com.cloudera.impala.authorization.Privilege.SELECT.
Referenced by com.cloudera.impala.analysis.BaseTableRef.analyze(), com.cloudera.impala.analysis.CollectionTableRef.analyze(), and com.cloudera.impala.analysis.TableRef.analyze().
|
inline |
Definition at line 200 of file TableRef.java.
References com.cloudera.impala.analysis.TableRef.resolvedPath_.
|
inline |
Definition at line 229 of file TableRef.java.
References com.cloudera.impala.analysis.TableRef.resolvedPath_.
Referenced by com.cloudera.impala.analysis.BaseTableRef.BaseTableRef(), and com.cloudera.impala.analysis.BaseTableRef.tableRefToSql().
|
inline |
Returns the explicit alias or the fully-qualified implicit alias. The returned alias is guaranteed to be unique (i.e., column/field references against the alias cannot be ambiguous).
Definition at line 212 of file TableRef.java.
References com.cloudera.impala.analysis.TableRef.aliases_.
Referenced by com.cloudera.impala.analysis.InlineViewRef.analyze(), com.cloudera.impala.analysis.TableRef.analyzeJoin(), com.cloudera.impala.planner.SingleNodePlanner.createJoinPlan(), com.cloudera.impala.analysis.TableRef.createTupleDescriptor(), com.cloudera.impala.analysis.InlineViewRef.createTupleDescriptor(), and com.cloudera.impala.analysis.TableRef.getExplicitAlias().
|
inline |
Definition at line 235 of file TableRef.java.
References com.cloudera.impala.analysis.TableRef.usingColNames_.
|
inline |
Returns true if this table ref has an explicit alias. Note that getAliases().length() == 1 does not imply an explicit alias because nested collection refs have only a single implicit alias.
Definition at line 219 of file TableRef.java.
References com.cloudera.impala.analysis.TableRef.hasExplicitAlias_.
Referenced by com.cloudera.impala.analysis.BaseTableRef.BaseTableRef(), com.cloudera.impala.analysis.CollectionTableRef.CollectionTableRef(), com.cloudera.impala.analysis.TableRef.getExplicitAlias(), and com.cloudera.impala.analysis.InlineViewRef.InlineViewRef().
|
inline |
Inverts the join whose rhs is represented by this table ref. If necessary, this function modifies the registered analysis state associated with this table ref, as well as the chain of left table references in refPlans as appropriate. Requires that this is the very first join in a series of joins.
Definition at line 447 of file TableRef.java.
References com.cloudera.impala.analysis.TableRef.getJoinOp(), com.cloudera.impala.analysis.Analyzer.invertOuterJoinState(), com.cloudera.impala.analysis.JoinOperator.isOuterJoin(), com.cloudera.impala.analysis.TableRef.joinOp_, com.cloudera.impala.analysis.TableRef.leftTblRef_, and com.cloudera.impala.analysis.TableRef.onClause_.
|
inline |
Definition at line 242 of file TableRef.java.
References com.cloudera.impala.analysis.TableRef.isBroadcastJoin_.
|
inline |
Returns true if the path of this table ref is is rooted at a registered parent ref.
Definition at line 197 of file TableRef.java.
Referenced by com.cloudera.impala.analysis.TableRef.analyzeJoin().
|
inline |
Definition at line 243 of file TableRef.java.
References com.cloudera.impala.analysis.TableRef.isPartitionedJoin_.
|
inline |
Definition at line 245 of file TableRef.java.
|
inlineprotected |
Set this table's context-dependent join attributes from the given table. Does not clone the attributes.
Definition at line 181 of file TableRef.java.
Referenced by com.cloudera.impala.analysis.InlineViewRef.InlineViewRef().
|
inline |
Definition at line 241 of file TableRef.java.
|
inline |
Definition at line 236 of file TableRef.java.
|
inline |
Definition at line 240 of file TableRef.java.
|
inline |
Definition at line 237 of file TableRef.java.
|
inline |
Definition at line 238 of file TableRef.java.
|
inlineprotected |
Definition at line 468 of file TableRef.java.
References com.cloudera.impala.analysis.TableRef.getExplicitAlias(), path(), com.cloudera.impala.analysis.TableRef.rawPath_, and com.cloudera.impala.analysis.TableRef.resolvedPath_.
Referenced by com.cloudera.impala.analysis.TableRef.toSql().
|
inline |
Implements com.cloudera.impala.analysis.ParseNode.
Definition at line 478 of file TableRef.java.
References com.cloudera.impala.analysis.TableRef.joinHints_, com.cloudera.impala.analysis.TableRef.joinOp_, com.cloudera.impala.analysis.TableRef.leftTblRef_, com.cloudera.impala.analysis.TableRef.onClause_, com.cloudera.impala.analysis.TableRef.tableRefToSql(), com.cloudera.impala.analysis.Expr.toSql(), com.cloudera.impala.analysis.JoinOperator.toString(), and com.cloudera.impala.analysis.TableRef.usingColNames_.
Referenced by com.cloudera.impala.analysis.TableRef.analyzeJoin(), com.cloudera.impala.analysis.BaseTableRef.tableRefToSql(), and com.cloudera.impala.analysis.InlineViewRef.tableRefToSql().
|
protected |
Definition at line 58 of file TableRef.java.
Referenced by com.cloudera.impala.analysis.BaseTableRef.BaseTableRef(), com.cloudera.impala.analysis.CollectionTableRef.CollectionTableRef(), com.cloudera.impala.analysis.TableRef.getAliases(), com.cloudera.impala.analysis.TableRef.getUniqueAlias(), com.cloudera.impala.analysis.InlineViewRef.InlineViewRef(), and com.cloudera.impala.analysis.TableRef.TableRef().
|
protected |
Definition at line 83 of file TableRef.java.
Referenced by com.cloudera.impala.analysis.BaseTableRef.analyze(), com.cloudera.impala.analysis.CollectionTableRef.analyze(), com.cloudera.impala.analysis.InlineViewRef.analyze(), com.cloudera.impala.analysis.TableRef.analyzeJoin(), com.cloudera.impala.analysis.TableRef.getDesc(), com.cloudera.impala.analysis.TableRef.getId(), and com.cloudera.impala.analysis.TableRef.getMaterializedTupleIds().
|
protected |
Definition at line 61 of file TableRef.java.
Referenced by com.cloudera.impala.analysis.TableRef.hasExplicitAlias(), and com.cloudera.impala.analysis.TableRef.TableRef().
|
protected |
Definition at line 77 of file TableRef.java.
Referenced by com.cloudera.impala.analysis.BaseTableRef.analyze(), com.cloudera.impala.analysis.CollectionTableRef.analyze(), com.cloudera.impala.analysis.InlineViewRef.analyze(), com.cloudera.impala.analysis.TableRef.getAllTupleIds(), com.cloudera.impala.analysis.InlineViewRef.getAnalyzer(), com.cloudera.impala.analysis.InlineViewRef.getBaseTblSmap(), com.cloudera.impala.analysis.TableRef.getDesc(), com.cloudera.impala.analysis.TableRef.getId(), com.cloudera.impala.analysis.InlineViewRef.getMaterializedTupleIds(), com.cloudera.impala.analysis.TableRef.getMaterializedTupleIds(), com.cloudera.impala.analysis.InlineViewRef.getSmap(), and com.cloudera.impala.analysis.TableRef.TableRef().
|
private |
Definition at line 69 of file TableRef.java.
Referenced by com.cloudera.impala.analysis.TableRef.analyzeJoin(), com.cloudera.impala.analysis.TableRef.analyzeJoinHints(), and com.cloudera.impala.analysis.TableRef.isBroadcastJoin().
|
private |
Definition at line 70 of file TableRef.java.
Referenced by com.cloudera.impala.analysis.TableRef.analyzeJoinHints(), and com.cloudera.impala.analysis.TableRef.isPartitionedJoin().
|
protected |
Definition at line 64 of file TableRef.java.
Referenced by com.cloudera.impala.analysis.TableRef.analyzeJoinHints(), com.cloudera.impala.analysis.TableRef.getJoinHints(), com.cloudera.impala.analysis.TableRef.TableRef(), and com.cloudera.impala.analysis.TableRef.toSql().
|
protected |
Definition at line 63 of file TableRef.java.
Referenced by com.cloudera.impala.analysis.TableRef.analyzeJoin(), com.cloudera.impala.analysis.TableRef.analyzeJoinHints(), com.cloudera.impala.analysis.TableRef.getJoinOp(), com.cloudera.impala.analysis.TableRef.invertJoin(), and com.cloudera.impala.analysis.TableRef.toSql().
|
protected |
Definition at line 73 of file TableRef.java.
Referenced by com.cloudera.impala.analysis.TableRef.analyzeJoin(), com.cloudera.impala.analysis.TableRef.getAllMaterializedTupleIds(), com.cloudera.impala.analysis.TableRef.getAllTupleIds(), com.cloudera.impala.analysis.TableRef.getLeftTblRef(), com.cloudera.impala.analysis.TableRef.invertJoin(), and com.cloudera.impala.analysis.TableRef.toSql().
|
protected |
Definition at line 65 of file TableRef.java.
Referenced by com.cloudera.impala.analysis.TableRef.analyzeJoin(), com.cloudera.impala.analysis.TableRef.getOnClause(), com.cloudera.impala.analysis.TableRef.invertJoin(), com.cloudera.impala.analysis.TableRef.TableRef(), and com.cloudera.impala.analysis.TableRef.toSql().
|
protected |
Definition at line 80 of file TableRef.java.
Referenced by com.cloudera.impala.analysis.TableRef.getOnClauseTupleIds().
|
protected |
Definition at line 47 of file TableRef.java.
Referenced by com.cloudera.impala.analysis.TableRef.analyze(), com.cloudera.impala.analysis.TableRef.getPath(), com.cloudera.impala.analysis.TableRef.TableRef(), and com.cloudera.impala.analysis.TableRef.tableRefToSql().
|
protected |
Definition at line 50 of file TableRef.java.
Referenced by com.cloudera.impala.analysis.CollectionTableRef.analyze(), com.cloudera.impala.analysis.TableRef.analyze(), com.cloudera.impala.analysis.BaseTableRef.BaseTableRef(), com.cloudera.impala.analysis.CollectionTableRef.CollectionTableRef(), com.cloudera.impala.analysis.TableRef.createTupleDescriptor(), com.cloudera.impala.analysis.TableRef.getResolvedPath(), com.cloudera.impala.analysis.TableRef.getTable(), com.cloudera.impala.analysis.CollectionTableRef.isChildRef(), and com.cloudera.impala.analysis.TableRef.tableRefToSql().
|
protected |
Definition at line 66 of file TableRef.java.
Referenced by com.cloudera.impala.analysis.TableRef.analyzeJoin(), com.cloudera.impala.analysis.TableRef.getUsingClause(), com.cloudera.impala.analysis.TableRef.TableRef(), and com.cloudera.impala.analysis.TableRef.toSql().