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

Public Member Functions

 SortInfo (List< Expr > orderingExprs, List< Boolean > isAscOrder, List< Boolean > nullsFirstParams)
 
void setMaterializedTupleInfo (TupleDescriptor tupleDesc, List< Expr > tupleSlotExprs)
 
List< ExprgetOrderingExprs ()
 
List< Boolean > getIsAscOrder ()
 
List< Boolean > getNullsFirstParams ()
 
List< ExprgetSortTupleSlotExprs ()
 
TupleDescriptor getSortTupleDescriptor ()
 
List< Boolean > getNullsFirst ()
 
void materializeRequiredSlots (Analyzer analyzer, ExprSubstitutionMap smap)
 
void substituteOrderingExprs (ExprSubstitutionMap smap, Analyzer analyzer)
 
void checkConsistency ()
 

Private Attributes

List< ExprorderingExprs_
 
final List< Boolean > isAscOrder_
 
final List< Boolean > nullsFirstParams_
 
TupleDescriptor sortTupleDesc_
 
List< ExprsortTupleSlotExprs_
 

Detailed Description

Encapsulates all the information needed to compute ORDER BY This doesn't contain aliases or positional exprs. TODO: reorganize this completely, this doesn't really encapsulate anything; this should move into planner/ and encapsulate the implementation of the sort of a particular input row (materialize all row slots)

Definition at line 29 of file SortInfo.java.

Constructor & Destructor Documentation

com.cloudera.impala.analysis.SortInfo.SortInfo ( List< Expr orderingExprs,
List< Boolean >  isAscOrder,
List< Boolean >  nullsFirstParams 
)
inline

Member Function Documentation

void com.cloudera.impala.analysis.SortInfo.checkConsistency ( )
inline

Asserts that all ordering exprs are bound by the sort tuple.

Definition at line 107 of file SortInfo.java.

References com.cloudera.impala.analysis.SortInfo.orderingExprs_.

List<Boolean> com.cloudera.impala.analysis.SortInfo.getIsAscOrder ( )
inline
List<Boolean> com.cloudera.impala.analysis.SortInfo.getNullsFirst ( )
inline

Gets the list of booleans indicating whether nulls come first or last, independent of asc/desc.

Definition at line 69 of file SortInfo.java.

References com.cloudera.impala.analysis.SortInfo.isAscOrder_.

List<Boolean> com.cloudera.impala.analysis.SortInfo.getNullsFirstParams ( )
inline
TupleDescriptor com.cloudera.impala.analysis.SortInfo.getSortTupleDescriptor ( )
inline
List<Expr> com.cloudera.impala.analysis.SortInfo.getSortTupleSlotExprs ( )
inline
void com.cloudera.impala.analysis.SortInfo.materializeRequiredSlots ( Analyzer  analyzer,
ExprSubstitutionMap  smap 
)
inline

Materializes the slots in sortTupleDesc_ referenced in the ordering exprs. Materializes the slots referenced by the corresponding sortTupleSlotExpr after applying the 'smap'.

Definition at line 83 of file SortInfo.java.

References com.cloudera.impala.analysis.SortInfo.orderingExprs_, com.cloudera.impala.analysis.SortInfo.sortTupleDesc_, and com.cloudera.impala.analysis.SortInfo.sortTupleSlotExprs_.

void com.cloudera.impala.analysis.SortInfo.setMaterializedTupleInfo ( TupleDescriptor  tupleDesc,
List< Expr tupleSlotExprs 
)
inline
void com.cloudera.impala.analysis.SortInfo.substituteOrderingExprs ( ExprSubstitutionMap  smap,
Analyzer  analyzer 
)
inline

Member Data Documentation

final List<Boolean> com.cloudera.impala.analysis.SortInfo.isAscOrder_
private
final List<Boolean> com.cloudera.impala.analysis.SortInfo.nullsFirstParams_
private

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