13#include "common/lang/limits.h"
14#include "common/lang/vector.h"
15#include "common/lang/unordered_set.h"
16#include "common/lang/memory.h"
17#include "common/log/log.h"
18#include "common/lang/unordered_map.h"
19#include "sql/optimizer/cascade/property_set.h"
92 int get_id()
const {
return id_; }
104 std::tuple<double, GroupExpr *> winner_;
108 std::vector<GroupExpr *> logical_expressions_;
110 std::vector<GroupExpr *> physical_expressions_;
112 unique_ptr<LogicalProperty> logical_prop_ =
nullptr;
Definition: group_expr.h:25
A class representing a group within cascade optimizer.
Definition: group.h:32
GroupExpr * get_winner()
Definition: group.cpp:62
bool set_expr_cost(GroupExpr *expr, double cost)
Sets the cost of a given expression in the group.
Definition: group.cpp:51
void set_explored()
Marks the group as explored.
Definition: group.h:85
const std::vector< GroupExpr * > & get_logical_expressions() const
Gets the logical expressions in the group.
Definition: group.h:68
void add_expr(GroupExpr *expr)
Adds an expression to the group.
Definition: group.cpp:41
const std::vector< GroupExpr * > & get_physical_expressions() const
Gets the physical expressions in the group.
Definition: group.h:73
LogicalProperty * get_logical_prop()
dump the group info, for debug
Definition: group.h:96
double get_cost_lb()
Gets the cost lower bound.
Definition: group.h:80
bool has_explored()
Checks if the group has been explored.
Definition: group.h:90
Logical Property, such as the cardinality of logical operator
Definition: property.h:20
: memorization
Definition: memo.h:29