Impala
Impalaistheopensource,nativeanalyticdatabaseforApacheHadoop.
|
Public Member Functions | |
ArrayList< Expr > | getAnalyticExprs () |
ExprSubstitutionMap | getSmap () |
List< Expr > | getCommonPartitionExprs () |
void | getRefdSlots (List< SlotId > ids) |
void | materializeRequiredSlots (Analyzer analyzer, ExprSubstitutionMap smap) |
void | checkConsistency () |
String | debugString () |
ArrayList< Expr > | getGroupingExprs () |
ArrayList< FunctionCallExpr > | getAggregateExprs () |
TupleDescriptor | getOutputTupleDesc () |
TupleDescriptor | getIntermediateTupleDesc () |
TupleId | getIntermediateTupleId () |
TupleId | getOutputTupleId () |
boolean | requiresIntermediateTuple () |
Static Public Member Functions | |
static AnalyticInfo | create (ArrayList< Expr > analyticExprs, Analyzer analyzer) |
static< TextendsExpr > boolean | requiresIntermediateTuple (List< T > aggExprs) |
Protected Member Functions | |
String | tupleDebugName () |
void | createTupleDescs (Analyzer analyzer) |
Protected Attributes | |
ArrayList< Expr > | groupingExprs_ |
ArrayList< FunctionCallExpr > | aggregateExprs_ |
TupleDescriptor | intermediateTupleDesc_ |
TupleDescriptor | outputTupleDesc_ |
ArrayList< Integer > | materializedSlots_ = Lists.newArrayList() |
Private Member Functions | |
AnalyticInfo (ArrayList< Expr > analyticExprs) | |
void | computeCommonPartitionExprs () |
Private Attributes | |
final ArrayList< Expr > | analyticExprs_ |
final List< Expr > | commonPartitionExprs_ = Lists.newArrayList() |
final ExprSubstitutionMap | analyticTupleSmap_ = new ExprSubstitutionMap() |
Static Private Attributes | |
static final Logger | LOG = LoggerFactory.getLogger(AnalyticInfo.class) |
Encapsulates the analytic functions found in a single select block plus the corresponding analytic result tuple and its substitution map.
Definition at line 32 of file AnalyticInfo.java.
|
inlineprivate |
Definition at line 46 of file AnalyticInfo.java.
References com.cloudera.impala.analysis.AnalyticInfo.analyticExprs_, and com.cloudera.impala.analysis.AnalyticInfo.computeCommonPartitionExprs().
Referenced by com.cloudera.impala.analysis.AnalyticInfo.create().
|
inline |
Validates internal state: Checks that the number of materialized slots of the analytic tuple corresponds to the number of materialized analytic functions. Also checks that the return types of the analytic exprs correspond to the slots in the analytic tuple.
Definition at line 143 of file AnalyticInfo.java.
References com.cloudera.impala.analysis.Expr.getType().
|
inlineprivate |
Computes the intersection of the partition exprs of all the analytic functions.
Definition at line 95 of file AnalyticInfo.java.
References com.cloudera.impala.analysis.AnalyticInfo.analyticExprs_, and com.cloudera.impala.analysis.AnalyticInfo.commonPartitionExprs_.
Referenced by com.cloudera.impala.analysis.AnalyticInfo.AnalyticInfo().
|
inlinestatic |
Creates complete AnalyticInfo for analyticExprs, including tuple descriptors and smaps.
Definition at line 64 of file AnalyticInfo.java.
References com.cloudera.impala.analysis.AnalyticInfo.AnalyticInfo().
|
inlineprotectedinherited |
Creates the intermediate and output tuple descriptors. If no agg expr has an intermediate type different from its output type, then only the output tuple descriptor is created and the intermediate tuple is set to the output tuple.
Definition at line 70 of file AggregateInfoBase.java.
References com.cloudera.impala.analysis.AggregateInfoBase.aggregateExprs_, com.cloudera.impala.analysis.AggregateInfoBase.createTupleDesc(), com.cloudera.impala.analysis.AggregateInfoBase.intermediateTupleDesc_, com.cloudera.impala.analysis.AggregateInfoBase.outputTupleDesc_, and com.cloudera.impala.analysis.AggregateInfoBase.requiresIntermediateTuple().
Referenced by com.cloudera.impala.analysis.AggregateInfo.createDistinctAggInfo().
|
inline |
|
inlineinherited |
Definition at line 157 of file AggregateInfoBase.java.
References com.cloudera.impala.analysis.AggregateInfoBase.aggregateExprs_.
Referenced by com.cloudera.impala.analysis.SelectStmt.analyze(), com.cloudera.impala.analysis.AnalyzerTest.checkSelectToThrift(), com.cloudera.impala.analysis.AggregateInfo.createMergeAggInfo(), com.cloudera.impala.planner.AggregationNode.getNodeExplainString(), and com.cloudera.impala.analysis.AggregateInfo.hasAggregateExprs().
|
inline |
Definition at line 56 of file AnalyticInfo.java.
References com.cloudera.impala.analysis.AnalyticInfo.analyticExprs_.
Referenced by com.cloudera.impala.planner.AnalyticPlanner.collectWindowGroups().
|
inline |
Definition at line 58 of file AnalyticInfo.java.
References com.cloudera.impala.analysis.AnalyticInfo.commonPartitionExprs_.
|
inlineinherited |
Definition at line 156 of file AggregateInfoBase.java.
References com.cloudera.impala.analysis.AggregateInfoBase.groupingExprs_.
Referenced by com.cloudera.impala.analysis.AnalyzerTest.checkSelectToThrift(), com.cloudera.impala.analysis.AggregateInfo.createMergeAggInfo(), com.cloudera.impala.analysis.AggregateInfo.createSecondPhaseAggInfo(), and com.cloudera.impala.planner.AggregationNode.getNodeExplainString().
|
inlineinherited |
Definition at line 159 of file AggregateInfoBase.java.
References com.cloudera.impala.analysis.AggregateInfoBase.intermediateTupleDesc_.
|
inlineinherited |
Definition at line 160 of file AggregateInfoBase.java.
Referenced by com.cloudera.impala.planner.AggregationNode.toThrift().
|
inlineinherited |
Definition at line 158 of file AggregateInfoBase.java.
References com.cloudera.impala.analysis.AggregateInfoBase.outputTupleDesc_.
Referenced by com.cloudera.impala.planner.AnalyticPlanner.collectWindowGroups().
|
inlineinherited |
Definition at line 161 of file AggregateInfoBase.java.
Referenced by com.cloudera.impala.planner.AggregationNode.AggregationNode(), com.cloudera.impala.planner.AnalyticPlanner.AnalyticPlanner(), com.cloudera.impala.analysis.SelectStmt.analyzeAggregation(), com.cloudera.impala.analysis.AggregateInfo.getResultTupleId(), com.cloudera.impala.planner.AggregationNode.setIntermediateTuple(), and com.cloudera.impala.planner.AggregationNode.toThrift().
|
inline |
Append ids of all slots that are being referenced in the process of performing the analytic computation described by this AnalyticInfo.
Definition at line 113 of file AnalyticInfo.java.
References com.cloudera.impala.analysis.AnalyticInfo.analyticExprs_, com.cloudera.impala.analysis.TupleDescriptor.getSlots(), and com.cloudera.impala.analysis.AggregateInfoBase.intermediateTupleDesc_.
|
inline |
Definition at line 57 of file AnalyticInfo.java.
References com.cloudera.impala.analysis.AnalyticInfo.analyticTupleSmap_.
|
inline |
Definition at line 123 of file AnalyticInfo.java.
References com.cloudera.impala.analysis.SlotDescriptor.isMaterialized().
|
inlineinherited |
Definition at line 162 of file AggregateInfoBase.java.
References com.cloudera.impala.analysis.AggregateInfoBase.intermediateTupleDesc_, and com.cloudera.impala.analysis.AggregateInfoBase.outputTupleDesc_.
Referenced by com.cloudera.impala.analysis.AggregateInfo.createSmaps(), and com.cloudera.impala.analysis.AggregateInfoBase.createTupleDescs().
|
inlinestaticinherited |
Returns true if evaluating the given aggregate exprs requires an intermediate tuple, i.e., whether one of the aggregate functions has an intermediate type different from its output type.
Definition at line 173 of file AggregateInfoBase.java.
|
inlineprotected |
Definition at line 177 of file AnalyticInfo.java.
|
protectedinherited |
Definition at line 31 of file AggregateInfoBase.java.
Referenced by com.cloudera.impala.analysis.AggregateInfoBase.AggregateInfoBase(), com.cloudera.impala.analysis.AggregateInfo.createSecondPhaseAggInfo(), com.cloudera.impala.analysis.AggregateInfo.createSmaps(), com.cloudera.impala.analysis.AggregateInfoBase.createTupleDesc(), com.cloudera.impala.analysis.AggregateInfoBase.createTupleDescs(), com.cloudera.impala.analysis.AggregateInfoBase.debugString(), com.cloudera.impala.analysis.AggregateInfoBase.getAggregateExprs(), com.cloudera.impala.analysis.AggregateInfo.getRefdSlots(), and com.cloudera.impala.analysis.AggregateInfo.substitute().
|
private |
Definition at line 38 of file AnalyticInfo.java.
Referenced by com.cloudera.impala.analysis.AnalyticInfo.AnalyticInfo(), com.cloudera.impala.analysis.AnalyticInfo.computeCommonPartitionExprs(), com.cloudera.impala.analysis.AnalyticInfo.debugString(), com.cloudera.impala.analysis.AnalyticInfo.getAnalyticExprs(), and com.cloudera.impala.analysis.AnalyticInfo.getRefdSlots().
|
private |
Definition at line 44 of file AnalyticInfo.java.
Referenced by com.cloudera.impala.analysis.AnalyticInfo.debugString(), and com.cloudera.impala.analysis.AnalyticInfo.getSmap().
|
private |
Definition at line 41 of file AnalyticInfo.java.
Referenced by com.cloudera.impala.analysis.AnalyticInfo.computeCommonPartitionExprs(), and com.cloudera.impala.analysis.AnalyticInfo.getCommonPartitionExprs().
|
protectedinherited |
Definition at line 26 of file AggregateInfoBase.java.
Referenced by com.cloudera.impala.analysis.AggregateInfoBase.AggregateInfoBase(), com.cloudera.impala.analysis.AggregateInfo.checkConsistency(), com.cloudera.impala.analysis.AggregateInfo.createSmaps(), com.cloudera.impala.analysis.AggregateInfoBase.createTupleDesc(), com.cloudera.impala.analysis.AggregateInfoBase.debugString(), com.cloudera.impala.analysis.AggregateInfoBase.getGroupingExprs(), com.cloudera.impala.analysis.AggregateInfo.getPartition(), com.cloudera.impala.analysis.AggregateInfo.getRefdSlots(), com.cloudera.impala.analysis.AggregateInfo.materializeRequiredSlots(), and com.cloudera.impala.analysis.AggregateInfo.substitute().
|
protectedinherited |
Definition at line 40 of file AggregateInfoBase.java.
Referenced by com.cloudera.impala.analysis.AggregateInfo.createMergeAggInfo(), com.cloudera.impala.analysis.AggregateInfo.createSecondPhaseAggInfo(), com.cloudera.impala.analysis.AggregateInfo.createSmaps(), com.cloudera.impala.analysis.AggregateInfoBase.createTupleDescs(), com.cloudera.impala.analysis.AggregateInfoBase.debugString(), com.cloudera.impala.analysis.AggregateInfoBase.getIntermediateTupleDesc(), com.cloudera.impala.analysis.AnalyticInfo.getRefdSlots(), and com.cloudera.impala.analysis.AggregateInfoBase.requiresIntermediateTuple().
|
staticprivate |
Definition at line 33 of file AnalyticInfo.java.
|
protectedinherited |
Definition at line 53 of file AggregateInfoBase.java.
Referenced by com.cloudera.impala.analysis.AggregateInfo.createMergeAggInfo(), and com.cloudera.impala.analysis.AggregateInfo.getMaterializedAggregateExprs().
|
protectedinherited |
Definition at line 47 of file AggregateInfoBase.java.
Referenced by com.cloudera.impala.analysis.AggregateInfo.createMergeAggInfo(), com.cloudera.impala.analysis.AggregateInfo.createSmaps(), com.cloudera.impala.analysis.AggregateInfoBase.createTupleDescs(), com.cloudera.impala.analysis.AggregateInfoBase.debugString(), com.cloudera.impala.analysis.AggregateInfoBase.getOutputTupleDesc(), com.cloudera.impala.analysis.AggregateInfo.getRefdSlots(), and com.cloudera.impala.analysis.AggregateInfoBase.requiresIntermediateTuple().