17#include "sql/operator/physical_operator.h"
18#include "sql/parser/parse.h"
34 OpType
get_op_type()
const override {
return OpType::INNERNLJOIN; }
42 RC open(
Trx *trx)
override;
45 Tuple *current_tuple()
override;
60 Tuple *left_tuple_ =
nullptr;
61 Tuple *right_tuple_ =
nullptr;
cost model in cost-based optimization(CBO)
Definition: cost_model.h:19
将两个tuple合并为一个tuple
Definition: tuple.h:390
Logical Property, such as the cardinality of logical operator
Definition: property.h:20
最简单的两表(称为左表、右表)join算子
Definition: join_physical_operator.h:26
PhysicalOperator * left_
左表右表的真实对象是在PhysicalOperator::children_中,这里是为了写的时候更简单
Definition: join_physical_operator.h:46
virtual double calculate_cost(LogicalProperty *prop, const vector< LogicalProperty * > &child_log_props, CostModel *cm) override
Calculates the cost of a logical operation.
Definition: nested_loop_join_physical_operator.h:36
Trx * trx_
右表遍历下一条数据,如果上一轮结束了就重新开始新的一轮
Definition: join_physical_operator.h:43
bool right_closed_
右表遍历的一轮是否结束
Definition: join_physical_operator.h:52
bool round_done_
当前关联的左右两个tuple
Definition: join_physical_operator.h:51
OpType get_op_type() const override
Definition: nested_loop_join_physical_operator.h:34
与LogicalOperator对应,物理算子描述执行计划将如何执行
Definition: physical_operator.h:63
事务接口
Definition: trx.h:141
元组的抽象描述
Definition: tuple.h:66
PhysicalOperatorType
物理算子类型
Definition: physical_operator.h:36