MiniOB 1
MiniOB is one mini database, helping developers to learn how database works.
载入中...
搜索中...
未找到
physical_plan_generator.h
1/* Copyright (c) 2021 OceanBase and/or its affiliates. All rights reserved.
2miniob is licensed under Mulan PSL v2.
3You can use this software according to the terms and conditions of the Mulan PSL v2.
4You may obtain a copy of Mulan PSL v2 at:
5 http://license.coscl.org.cn/MulanPSL2
6THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
7EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
8MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
9See the Mulan PSL v2 for more details. */
10
11//
12// Created by Wangyunlai on 2022/12/14.
13//
14
15#pragma once
16
17#include <memory>
18
19#include "common/rc.h"
20#include "sql/operator/physical_operator.h"
21#include "sql/operator/logical_operator.h"
22
31
39{
40public:
41 PhysicalPlanGenerator() = default;
42 virtual ~PhysicalPlanGenerator() = default;
43
44 RC create(LogicalOperator &logical_operator, std::unique_ptr<PhysicalOperator> &oper);
45
46private:
47 RC create_plan(TableGetLogicalOperator &logical_oper, std::unique_ptr<PhysicalOperator> &oper);
48 RC create_plan(PredicateLogicalOperator &logical_oper, std::unique_ptr<PhysicalOperator> &oper);
49 RC create_plan(ProjectLogicalOperator &logical_oper, std::unique_ptr<PhysicalOperator> &oper);
50 RC create_plan(InsertLogicalOperator &logical_oper, std::unique_ptr<PhysicalOperator> &oper);
51 RC create_plan(DeleteLogicalOperator &logical_oper, std::unique_ptr<PhysicalOperator> &oper);
52 RC create_plan(ExplainLogicalOperator &logical_oper, std::unique_ptr<PhysicalOperator> &oper);
53 RC create_plan(JoinLogicalOperator &logical_oper, std::unique_ptr<PhysicalOperator> &oper);
54 RC create_plan(CalcLogicalOperator &logical_oper, std::unique_ptr<PhysicalOperator> &oper);
55};
逻辑算子描述当前执行计划要做什么
Definition: calc_logical_operator.h:27
逻辑算子,用于执行delete语句
Definition: delete_logical_operator.h:24
Explain逻辑算子
Definition: explain_logical_operator.h:24
插入逻辑算子
Definition: insert_logical_operator.h:27
连接算子
Definition: join_logical_operator.h:25
逻辑算子描述当前执行计划要做什么
Definition: logical_operator.h:50
物理计划生成器
Definition: physical_plan_generator.h:39
谓词/过滤逻辑算子
Definition: predicate_logical_operator.h:25
project 表示投影运算
Definition: project_logical_operator.h:30
表示从表中获取数据的算子
Definition: table_get_logical_operator.h:25