MiniOB 1
MiniOB is one mini database, helping developers to learn how database works.
载入中...
搜索中...
未找到
predicate_physical_operator.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/6/27.
13//
14
15#pragma once
16
17#include "sql/expr/expression.h"
18#include "sql/operator/physical_operator.h"
19
20class FilterStmt;
21
27{
28public:
29 PredicatePhysicalOperator(unique_ptr<Expression> expr);
30
31 virtual ~PredicatePhysicalOperator() = default;
32
33 PhysicalOperatorType type() const override { return PhysicalOperatorType::PREDICATE; }
34 OpType get_op_type() const override { return OpType::FILTER; }
35
36 RC open(Trx *trx) override;
37 RC next() override;
38 RC close() override;
39
40 Tuple *current_tuple() override;
41
42 RC tuple_schema(TupleSchema &schema) const override;
43
44private:
45 unique_ptr<Expression> expression_;
46};
Filter/谓词/过滤语句
Definition: filter_stmt.h:73
与LogicalOperator对应,物理算子描述执行计划将如何执行
Definition: physical_operator.h:63
过滤/谓词物理算子
Definition: predicate_physical_operator.h:27
OpType get_op_type() const override
Definition: predicate_physical_operator.h:34
事务接口
Definition: trx.h:141
元组的结构,包含哪些字段(这里成为Cell),每个字段的说明
Definition: tuple.h:48
元组的抽象描述
Definition: tuple.h:66
PhysicalOperatorType
物理算子类型
Definition: physical_operator.h:36