网址查询地址查询站长之家,做电商网站企业,c mvc制作网站开发,网站管理员容易做吗如上图所示#xff0c;CDXLOperator作为Base class for operators in a DXL tree#xff0c;其子类CDXLLogical、CDXLScalar、CDXLPhysical作为逻辑节点、物理节点和Scalar节点的DXL表示类#xff0c;因此其包含了这些类的共同部分特性#xff0c;比如获取其DXL节点表示的函…
如上图所示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 operators 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等。