MiniOB 1
MiniOB is one mini database, helping developers to learn how database works.
载入中...
搜索中...
未找到
Public 成员函数 | Protected 属性 | 所有成员列表
Rule类 参考abstract

#include <rules.h>

类 Rule 继承关系图:
LogicalCalcToCalc LogicalDeleteToDelete LogicalExplainToExplain LogicalGetToPhysicalSeqScan LogicalInsertToInsert LogicalPredicateToPredicate LogicalProjectionToProjection

Public 成员函数

Patternget_match_pattern () const
 
bool is_physical () const
 
bool is_logical () const
 
RuleType get_type ()
 
uint32_t get_rule_idx ()
 
virtual RulePromise promise (GroupExpr *group_expr) const
 
virtual void transform (OperatorNode *input, std::vector< std::unique_ptr< OperatorNode > > *transformed, OptimizerContext *context) const =0
 

Protected 属性

RuleType type_
 
unique_ptr< Patternmatch_pattern_
 

详细描述

TODO: Distinguish from logical rules and unify logical rewrite rule

成员函数说明

◆ get_match_pattern()

Pattern * Rule::get_match_pattern ( ) const
inline

Gets the match pattern for the rule

返回
match pattern

◆ get_rule_idx()

uint32_t Rule::get_rule_idx ( )
inline
返回
index of the rule for bitmask

◆ get_type()

RuleType Rule::get_type ( )
inline
返回
the type of the rule

◆ is_logical()

bool Rule::is_logical ( ) const
inline
返回
whether the rule is a logical rule

◆ is_physical()

bool Rule::is_physical ( ) const
inline
返回
whether the rule is a physical transformation

◆ promise()

virtual RulePromise Rule::promise ( GroupExpr group_expr) const
inlinevirtual

Get the promise of the current rule for a expression in the current context.

返回
The promise, the higher the promise, the rule should be applied sooner

◆ transform()

virtual void Rule::transform ( OperatorNode input,
std::vector< std::unique_ptr< OperatorNode > > *  transformed,
OptimizerContext context 
) const
pure virtual

Convert a "before" operator tree to an "after" operator tree

参数
inputThe "before" operator tree
transformedVector of "after" operator trees
contextThe current optimization context

LogicalGetToPhysicalSeqScan, LogicalProjectionToProjection, LogicalInsertToInsert, LogicalExplainToExplain, LogicalCalcToCalc, LogicalDeleteToDelete , 以及 LogicalPredicateToPredicate 内被实现.


该类的文档由以下文件生成: