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

Public Member Functions

 OrderByElement (Expr expr, boolean isAsc, Boolean nullsFirstParam)
 
Expr getExpr ()
 
void setExpr (Expr e)
 
boolean isAsc ()
 
Boolean getNullsFirstParam ()
 
boolean nullsFirst ()
 
String toSql ()
 
boolean equals (Object obj)
 
OrderByElement clone ()
 

Static Public Member Functions

static boolean nullsFirst (Boolean nullsFirstParam, boolean isAsc)
 
static List< OrderByElementsubstitute (List< OrderByElement > src, ExprSubstitutionMap smap, Analyzer analyzer)
 
static List< ExprgetOrderByExprs (List< OrderByElement > src)
 
static List< OrderByElementreverse (List< OrderByElement > src)
 

Private Attributes

Expr expr_
 
final boolean isAsc_
 
final Boolean nullsFirstParam_
 

Detailed Description

Combination of expr, ASC/DESC, and nulls ordering.

Definition at line 25 of file OrderByElement.java.

Constructor & Destructor Documentation

com.cloudera.impala.analysis.OrderByElement.OrderByElement ( Expr  expr,
boolean  isAsc,
Boolean  nullsFirstParam 
)
inline

Constructs the OrderByElement.

'nullsFirstParam' should be true if "NULLS FIRST", false if "NULLS LAST", or null if the NULLs order was not specified.

Definition at line 38 of file OrderByElement.java.

References com.cloudera.impala.analysis.OrderByElement.isAsc().

Referenced by com.cloudera.impala.analysis.OrderByElement.clone(), com.cloudera.impala.analysis.OrderByElement.equals(), com.cloudera.impala.analysis.OrderByElement.reverse(), and com.cloudera.impala.analysis.OrderByElement.substitute().

Member Function Documentation

boolean com.cloudera.impala.analysis.OrderByElement.equals ( Object  obj)
inline
Expr com.cloudera.impala.analysis.OrderByElement.getExpr ( )
inline
Boolean com.cloudera.impala.analysis.OrderByElement.getNullsFirstParam ( )
inline
static List<Expr> com.cloudera.impala.analysis.OrderByElement.getOrderByExprs ( List< OrderByElement src)
inlinestatic

Extracts the order-by exprs from the list of order-by elements and returns them.

Definition at line 123 of file OrderByElement.java.

Referenced by com.cloudera.impala.planner.AnalyticPlanner.createSortGroupPlan().

boolean com.cloudera.impala.analysis.OrderByElement.isAsc ( )
inline
static boolean com.cloudera.impala.analysis.OrderByElement.nullsFirst ( Boolean  nullsFirstParam,
boolean  isAsc 
)
inlinestatic

Compute nullsFirst.

Parameters
nullsFirstParamTrue if "NULLS FIRST", false if "NULLS LAST", or null if the NULLs order was not specified.
isAsc
Returns
Returns true if nulls are ordered first or false if nulls are ordered last. Independent of isAsc.

Definition at line 102 of file OrderByElement.java.

static List<OrderByElement> com.cloudera.impala.analysis.OrderByElement.reverse ( List< OrderByElement src)
inlinestatic

Returns a new list of OrderByElements with the same (cloned) expressions but the ordering direction reversed (asc becomes desc, nulls first becomes nulls last, etc.)

Definition at line 135 of file OrderByElement.java.

References com.cloudera.impala.analysis.OrderByElement.getExpr(), com.cloudera.impala.analysis.OrderByElement.isAsc_, com.cloudera.impala.analysis.OrderByElement.nullsFirst(), com.cloudera.impala.analysis.OrderByElement.nullsFirstParam_, and com.cloudera.impala.analysis.OrderByElement.OrderByElement().

void com.cloudera.impala.analysis.OrderByElement.setExpr ( Expr  e)
inline
static List<OrderByElement> com.cloudera.impala.analysis.OrderByElement.substitute ( List< OrderByElement src,
ExprSubstitutionMap  smap,
Analyzer  analyzer 
)
inlinestatic

Returns a new list of order-by elements with the order by exprs of src substituted according to smap. Preserves the other sort params from src.

Definition at line 110 of file OrderByElement.java.

References com.cloudera.impala.analysis.OrderByElement.OrderByElement().

Referenced by com.cloudera.impala.planner.AnalyticPlanner.createSortGroupPlan().

String com.cloudera.impala.analysis.OrderByElement.toSql ( )
inline

Member Data Documentation


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