17#include "sql/operator/physical_operator.h"
18#include "sql/expr/expression_tuple.h"
32 OpType
get_op_type()
const override {
return OpType::PROJECTION; }
37 return (cm->
cpu_op()) * prop->get_card();
40 RC open(
Trx *trx)
override;
44 int cell_num()
const {
return tuple_.
cell_num(); }
46 Tuple *current_tuple()
override;
48 RC tuple_schema(
TupleSchema &schema)
const override;
51 vector<unique_ptr<Expression>> expressions_;
cost model in cost-based optimization(CBO)
Definition: cost_model.h:19
double cpu_op()
cpu cost of building hash table
Definition: cost_model.h:32
Definition: expression_tuple.h:24
int cell_num() const override
获取元组中的Cell的个数
Definition: expression_tuple.h:31
Logical Property, such as the cardinality of logical operator
Definition: property.h:20
与LogicalOperator对应,物理算子描述执行计划将如何执行
Definition: physical_operator.h:63
选择/投影物理算子
Definition: project_physical_operator.h:25
OpType get_op_type() const override
Definition: project_physical_operator.h:32
virtual double calculate_cost(LogicalProperty *prop, const vector< LogicalProperty * > &child_log_props, CostModel *cm) override
Calculates the cost of a logical operation.
Definition: project_physical_operator.h:34
事务接口
Definition: trx.h:141
元组的结构,包含哪些字段(这里成为Cell),每个字段的说明
Definition: tuple.h:48
元组的抽象描述
Definition: tuple.h:66
PhysicalOperatorType
物理算子类型
Definition: physical_operator.h:36