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

Public Member Functions

ArrayList< ExprgetAnalyticExprs ()
 
ExprSubstitutionMap getSmap ()
 
List< ExprgetCommonPartitionExprs ()
 
void getRefdSlots (List< SlotId > ids)
 
void materializeRequiredSlots (Analyzer analyzer, ExprSubstitutionMap smap)
 
void checkConsistency ()
 
String debugString ()
 
ArrayList< ExprgetGroupingExprs ()
 
ArrayList< FunctionCallExprgetAggregateExprs ()
 
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< ExprgroupingExprs_
 
ArrayList< FunctionCallExpraggregateExprs_
 
TupleDescriptor intermediateTupleDesc_
 
TupleDescriptor outputTupleDesc_
 
ArrayList< Integer > materializedSlots_ = Lists.newArrayList()
 

Private Member Functions

 AnalyticInfo (ArrayList< Expr > analyticExprs)
 
void computeCommonPartitionExprs ()
 

Private Attributes

final ArrayList< ExpranalyticExprs_
 
final List< ExprcommonPartitionExprs_ = Lists.newArrayList()
 
final ExprSubstitutionMap analyticTupleSmap_ = new ExprSubstitutionMap()
 

Static Private Attributes

static final Logger LOG = LoggerFactory.getLogger(AnalyticInfo.class)
 

Detailed Description

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.

Constructor & Destructor Documentation

com.cloudera.impala.analysis.AnalyticInfo.AnalyticInfo ( ArrayList< Expr analyticExprs)
inlineprivate

Member Function Documentation

void com.cloudera.impala.analysis.AnalyticInfo.checkConsistency ( )
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().

void com.cloudera.impala.analysis.AnalyticInfo.computeCommonPartitionExprs ( )
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().

static AnalyticInfo com.cloudera.impala.analysis.AnalyticInfo.create ( ArrayList< Expr analyticExprs,
Analyzer  analyzer 
)
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().

void com.cloudera.impala.analysis.AggregateInfoBase.createTupleDescs ( Analyzer  analyzer)
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().

ArrayList<Expr> com.cloudera.impala.analysis.AnalyticInfo.getAnalyticExprs ( )
inline
List<Expr> com.cloudera.impala.analysis.AnalyticInfo.getCommonPartitionExprs ( )
inline
TupleDescriptor com.cloudera.impala.analysis.AggregateInfoBase.getIntermediateTupleDesc ( )
inlineinherited
TupleId com.cloudera.impala.analysis.AggregateInfoBase.getIntermediateTupleId ( )
inlineinherited
TupleDescriptor com.cloudera.impala.analysis.AggregateInfoBase.getOutputTupleDesc ( )
inlineinherited
void com.cloudera.impala.analysis.AnalyticInfo.getRefdSlots ( List< SlotId ids)
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_.

ExprSubstitutionMap com.cloudera.impala.analysis.AnalyticInfo.getSmap ( )
inline
void com.cloudera.impala.analysis.AnalyticInfo.materializeRequiredSlots ( Analyzer  analyzer,
ExprSubstitutionMap  smap 
)
inline
static <TextendsExpr> boolean com.cloudera.impala.analysis.AggregateInfoBase.requiresIntermediateTuple ( List< T >  aggExprs)
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.

String com.cloudera.impala.analysis.AnalyticInfo.tupleDebugName ( )
inlineprotected

Definition at line 177 of file AnalyticInfo.java.

Member Data Documentation

final ExprSubstitutionMap com.cloudera.impala.analysis.AnalyticInfo.analyticTupleSmap_ = new ExprSubstitutionMap()
private
final List<Expr> com.cloudera.impala.analysis.AnalyticInfo.commonPartitionExprs_ = Lists.newArrayList()
private
final Logger com.cloudera.impala.analysis.AnalyticInfo.LOG = LoggerFactory.getLogger(AnalyticInfo.class)
staticprivate

Definition at line 33 of file AnalyticInfo.java.

ArrayList<Integer> com.cloudera.impala.analysis.AggregateInfoBase.materializedSlots_ = Lists.newArrayList()
protectedinherited

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