当前位置: 首页 > news >正文

ORCA优化器浅析——CDXLOperator Base class for operators in a DXL tree

在这里插入图片描述

如上图所示,CDXLOperator作为Base class for operators in a DXL tree,其子类CDXLLogical、CDXLScalar、CDXLPhysical作为逻辑节点、物理节点和Scalar节点的DXL表示类,因此其包含了这些类的共同部分特性,比如获取其DXL节点表示的函数GetDXLOperator、获取其Operator类型的函数GetDXLOperatorType,如下图右侧所示。

class CDXLOperator : public CRefCount {
private:	CDXLOperator(const CDXLOperator &); // private copy constructor
protected:	CMemoryPool *m_mp; // memory pool
public:	explicit CDXLOperator(CMemoryPool *); // ctor/dtorvirtual ~CDXLOperator();	virtual Edxlopid GetDXLOperator() const = 0; // ident accessors	virtual const CWStringConst *GetOpNameStr() const = 0; // name of the operatorvirtual Edxloptype GetDXLOperatorType() const = 0;// serialize operator in DXL format given a serializer object and the// host DXL node, providing access to the operator's childrenvirtual void SerializeToDXL(CXMLSerializer *, const CDXLNode *) const = 0;// check if given column is defined by operatorvirtual BOOL IsColDefined(ULONG	 // colid ) const { // by default, operator does not define columnsreturn false;}static const CWStringConst *GetJoinTypeNameStr(EdxlJoinType);	static const CWStringConst *GetIdxScanDirectionStr(EdxlIndexScanDirection); // Return the index scan direction
};

其中最重要的函数是SerializeToDXL,该函数用于使用给定serializer object将operator序列化成DXL format。而GetOpNameStr函数则是获取该operator DXL类在DXL format中的标签,其实就是xml中的标签,如下代码所示,CDXLScalarAggref的标签为CDXLTokens::GetDXLTokenStr(EdxltokenScalarAggref),即为AggFunc。

const CWStringConst *CDXLScalarAggref::GetOpNameStr() const{return CDXLTokens::GetDXLTokenStr(EdxltokenScalarAggref);
}{EdxltokenScalarAggref, GPOS_WSZ_LIT("AggFunc")},

在这里插入图片描述
operators in a DXL tree仅仅是DXL tree中的一部分,除了Operator DXL节点的标签,还有其他标签,比如Comment、Plan、Id等。
在这里插入图片描述

http://www.lryc.cn/news/122384.html

相关文章:

  • go入门实践四-go实现一个简单的tcp-socks5代理服务
  • div 中元素居中的N种常用方法
  • Java获取指定文件夹下目录下所有视频并复制到另一个地方
  • windows server 2016 搭建使用 svn 服务器教程
  • 【Python】如何判断时间序列数据是否为平稳时间序列或非平稳时间序列?
  • Labview控制APx(Audio Precision)进行测试测量(六)
  • 【Linux】网络协议总结
  • 如何轻松注册企业邮箱?快速掌握超简单的注册技巧!
  • 【行为型设计模式】C#设计模式之观察者模式
  • 《Java面向对象程序设计》学习笔记——第 8 章 设计模式
  • Java学习笔记28——字节流1
  • C++连接串口方式(MFC版本)(简单版本)
  • ospf重发布
  • 基于weka手工实现K-means
  • 分布式系统监控zabbix安装部署及使用
  • 【H5】使用 JavaScript 和 CSS 来完成实现鼠标接触时显示一个图片弹窗
  • CSS选择器分类梳理并高亮重点
  • Python批量给excel文件加密
  • 程序设计 树基础
  • Java 并发编程与CAS基本原理
  • qt creater运行按钮灰色,问题记录
  • 【jvm】类加载器的分类
  • 电路基础之电容
  • 函数柯里化
  • 【HBZ分享】ES中的Reindex重建索引
  • 【PostgreSQL】几个提高性能的小特性
  • [C语言] 指针
  • win10在vmware15中安装macos10.13系统
  • Node.js:实现遍历文件夹下所有文件
  • Git详解及使用