21 static std::unique_ptr<Sort>
22 Create(std::unique_ptr<PlanNode>&& child,
23 std::vector<std::unique_ptr<ExprNode>>&& sort_exprs,
24 const std::vector<bool>& desc);
35 Sort(std::unique_ptr<PlanNode>&& child,
36 std::vector<std::unique_ptr<ExprNode>>&& sort_exprs,
37 const std::vector<bool>& desc);
PlanNode is an abstract interface representing physical query plan that does not bound with any parti...
Definition: PlanNode.h:26
A Schema object stores the information for accessing an ordered set of typed fields either from a dis...
Definition: Schema.h:39
SortState is the execution state for sorting.
Definition: SortState.h:19
Sort is the physical plan for sorting operators.
Definition: Sort.h:19
Sort(std::unique_ptr< PlanNode > &&child, std::vector< std::unique_ptr< ExprNode >> &&sort_exprs, const std::vector< bool > &desc)
Definition: Sort.cpp:11
std::unique_ptr< PlanExecState > create_exec_state() const override
Create the corresponding execution state for the physical plan so that it can be used as physical sca...
Definition: Sort.cpp:44
int sort_compare_func_impl(const char *a, const char *b) const
Definition: Sort.cpp:21
const Schema * get_output_schema() const override
Each physical plan should link a schema for its output relation, incidating what fields are included ...
Definition: Sort.cpp:50
void node_properties_to_string(std::string &buf, int indent) const override
Definition: Sort.cpp:39
SortCompareFunction m_cmp
Definition: Sort.h:41
~Sort() override
Definition: Sort.cpp:34
static std::unique_ptr< Sort > Create(std::unique_ptr< PlanNode > &&child, std::vector< std::unique_ptr< ExprNode >> &&sort_exprs, const std::vector< bool > &desc)
Definition: Sort.cpp:27
std::function< int(const char *item1, const char *item2)> SortCompareFunction
SortCompareFunction compares item1 and item2 and returns a negative integer if item1 < item2,...
Definition: ExternalSort.h:25