Impala
Impalaistheopensource,nativeanalyticdatabaseforApacheHadoop.
|
#include <tuple-row-compare.h>
Public Member Functions | |
TupleRowComparator (const std::vector< ExprContext * > &key_expr_ctxs_lhs, const std::vector< ExprContext * > &key_expr_ctxs_rhs, const std::vector< bool > &is_asc, const std::vector< bool > &nulls_first) | |
TupleRowComparator (const std::vector< ExprContext * > &key_expr_ctxs_lhs, const std::vector< ExprContext * > &key_expr_ctxs_rhs, bool is_asc, bool nulls_first) | |
int | Compare (TupleRow *lhs, TupleRow *rhs) const |
bool | operator() (TupleRow *lhs, TupleRow *rhs) const |
bool | operator() (Tuple *lhs, Tuple *rhs) const |
Private Attributes | |
std::vector< ExprContext * > | key_expr_ctxs_lhs_ |
std::vector< ExprContext * > | key_expr_ctxs_rhs_ |
std::vector< bool > | is_asc_ |
std::vector< int8_t > | nulls_first_ |
Definition at line 27 of file tuple-row-compare.h.
|
inline |
Compares two TupleRows based on a set of exprs, in order. We use is_asc to determine, for each expr, if it should be ascending or descending sort order. We use nulls_first to determine, for each expr, if nulls should come before or after all other values.
Definition at line 34 of file tuple-row-compare.h.
References nulls_first_.
|
inline |
Definition at line 51 of file tuple-row-compare.h.
Returns a negative value if lhs is less than rhs, a positive value if lhs is greater than rhs, or 0 if they are equal. All exprs (key_exprs_lhs_ and key_exprs_rhs_) must have been prepared and opened before calling this.
Definition at line 65 of file tuple-row-compare.h.
References impala::RawValue::Compare(), is_asc_, key_expr_ctxs_lhs_, key_expr_ctxs_rhs_, and nulls_first_.
Referenced by operator()().
Returns true if lhs is strictly less than rhs. All exprs (key_exprs_lhs_ and key_exprs_rhs_) must have been prepared and opened before calling this.
Definition at line 87 of file tuple-row-compare.h.
References Compare().
Definition at line 93 of file tuple-row-compare.h.
|
private |
Definition at line 102 of file tuple-row-compare.h.
Referenced by Compare().
|
private |
Definition at line 100 of file tuple-row-compare.h.
Referenced by Compare().
|
private |
Definition at line 101 of file tuple-row-compare.h.
Referenced by Compare().
|
private |
Definition at line 103 of file tuple-row-compare.h.
Referenced by Compare(), and TupleRowComparator().