22 return Init(sort_info.ordering_exprs,
23 sort_info.__isset.sort_tuple_slot_exprs ? &sort_info.sort_tuple_slot_exprs : NULL,
32 if (sort_tuple_slot_exprs != NULL) {
static Status Clone(const std::vector< ExprContext * > &ctxs, RuntimeState *state, std::vector< ExprContext * > *new_ctxs)
static Status Open(const std::vector< ExprContext * > &ctxs, RuntimeState *state)
Convenience function for opening multiple expr trees.
#define RETURN_IF_ERROR(stmt)
some generally useful macros
Status Open(RuntimeState *state)
Open all expressions used for sorting and tuple materialization.
std::vector< ExprContext * > sort_tuple_slot_expr_ctxs_
static void Close(const std::vector< ExprContext * > &ctxs, RuntimeState *state)
Convenience function for closing multiple expr trees.
std::vector< ExprContext * > rhs_ordering_expr_ctxs_
Status Init(const TSortInfo &sort_info, ObjectPool *pool)
Initialize the expressions from a TSortInfo using the specified pool.
This class is thread-safe.
std::vector< ExprContext * > lhs_ordering_expr_ctxs_
Create two ExprContexts for evaluating over the TupleRows.
Status Prepare(RuntimeState *state, const RowDescriptor &child_row_desc, const RowDescriptor &output_row_desc, MemTracker *expr_mem_tracker)
Prepare all expressions used for sorting and tuple materialization.
static Status CreateExprTrees(ObjectPool *pool, const std::vector< TExpr > &texprs, std::vector< ExprContext * > *ctxs)
static Status Prepare(const std::vector< ExprContext * > &ctxs, RuntimeState *state, const RowDescriptor &row_desc, MemTracker *tracker)
void Close(RuntimeState *state)
Close all expressions used for sorting and tuple materialization.