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

Public Member Functions

abstract void materializeRequiredSlots (Analyzer analyzer, ExprSubstitutionMap smap)
 
ArrayList< ExprgetGroupingExprs ()
 
ArrayList< FunctionCallExprgetAggregateExprs ()
 
TupleDescriptor getOutputTupleDesc ()
 
TupleDescriptor getIntermediateTupleDesc ()
 
TupleId getIntermediateTupleId ()
 
TupleId getOutputTupleId ()
 
boolean requiresIntermediateTuple ()
 
String debugString ()
 

Static Public Member Functions

static< TextendsExpr > boolean requiresIntermediateTuple (List< T > aggExprs)
 

Protected Member Functions

 AggregateInfoBase (ArrayList< Expr > groupingExprs, ArrayList< FunctionCallExpr > aggExprs)
 
void createTupleDescs (Analyzer analyzer)
 
abstract String tupleDebugName ()
 

Protected Attributes

ArrayList< ExprgroupingExprs_
 
ArrayList< FunctionCallExpraggregateExprs_
 
TupleDescriptor intermediateTupleDesc_
 
TupleDescriptor outputTupleDesc_
 
ArrayList< Integer > materializedSlots_ = Lists.newArrayList()
 

Private Member Functions

TupleDescriptor createTupleDesc (Analyzer analyzer, boolean isOutputTuple)
 

Static Private Attributes

static final Logger LOG
 

Detailed Description

Base class for AggregateInfo and AnalyticInfo containing the intermediate and output tuple descriptors as well as their smaps for evaluating aggregate functions.

Definition at line 20 of file AggregateInfoBase.java.

Constructor & Destructor Documentation

com.cloudera.impala.analysis.AggregateInfoBase.AggregateInfoBase ( ArrayList< Expr groupingExprs,
ArrayList< FunctionCallExpr aggExprs 
)
inlineprotected

Member Function Documentation

TupleDescriptor com.cloudera.impala.analysis.AggregateInfoBase.createTupleDesc ( Analyzer  analyzer,
boolean  isOutputTuple 
)
inlineprivate

Returns a tuple descriptor for the aggregation/analytic's intermediate or final result, depending on whether isOutputTuple is true or false. Also updates the appropriate substitution map, and creates and registers auxiliary equality predicates between the grouping slots and the grouping exprs.

Definition at line 87 of file AggregateInfoBase.java.

References com.cloudera.impala.analysis.AggregateInfoBase.aggregateExprs_, com.cloudera.impala.analysis.AggregateInfoBase.groupingExprs_, com.cloudera.impala.analysis.Expr.isConstant(), com.cloudera.impala.catalog.Type.isWildcardDecimal(), and com.cloudera.impala.analysis.AggregateInfoBase.tupleDebugName().

Referenced by com.cloudera.impala.analysis.AggregateInfoBase.createTupleDescs().

void com.cloudera.impala.analysis.AggregateInfoBase.createTupleDescs ( Analyzer  analyzer)
inlineprotected

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().

TupleDescriptor com.cloudera.impala.analysis.AggregateInfoBase.getIntermediateTupleDesc ( )
inline
TupleId com.cloudera.impala.analysis.AggregateInfoBase.getIntermediateTupleId ( )
inline
TupleDescriptor com.cloudera.impala.analysis.AggregateInfoBase.getOutputTupleDesc ( )
inline
abstract void com.cloudera.impala.analysis.AggregateInfoBase.materializeRequiredSlots ( Analyzer  analyzer,
ExprSubstitutionMap  smap 
)
abstract

Marks the slots required for evaluating an Analytic/AggregateInfo by resolving the materialized aggregate/analytic exprs against smap, and then marking their slots.

static <TextendsExpr> boolean com.cloudera.impala.analysis.AggregateInfoBase.requiresIntermediateTuple ( List< T >  aggExprs)
inlinestatic

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.

abstract String com.cloudera.impala.analysis.AggregateInfoBase.tupleDebugName ( )
abstractprotected

Member Data Documentation

final Logger com.cloudera.impala.analysis.AggregateInfoBase.LOG
staticprivate
Initial value:
=
LoggerFactory.getLogger(AggregateInfoBase.class)

Definition at line 21 of file AggregateInfoBase.java.

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

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