greenplumn CDXLPhysicalMergeJoin 源码

  • 2022-08-18
  • 浏览 (345)

greenplumn CDXLPhysicalMergeJoin 代码

文件路径:/src/backend/gporca/libnaucrates/include/naucrates/dxl/operators/CDXLPhysicalMergeJoin.h

//---------------------------------------------------------------------------
//	Greenplum Database
//	Copyright (C) 2011 Greenplum, Inc.
//
//	@filename:
//		CDXLPhysicalMergeJoin.h
//
//	@doc:
//		Class for representing DXL merge join operators.
//---------------------------------------------------------------------------



#ifndef GPDXL_CDXLPhysicalMergeJoin_H
#define GPDXL_CDXLPhysicalMergeJoin_H

#include "gpos/base.h"

#include "naucrates/dxl/operators/CDXLPhysicalJoin.h"

namespace gpdxl
{
// indices of merge join elements in the children array
enum Edxlmj
{
	EdxlmjIndexProjList = 0,
	EdxlmjIndexFilter,
	EdxlmjIndexJoinFilter,
	EdxlmjIndexMergeCondList,
	EdxlmjIndexLeftChild,
	EdxlmjIndexRightChild,
	EdxlmjIndexSentinel
};

//---------------------------------------------------------------------------
//	@class:
//		CDXLPhysicalMergeJoin
//
//	@doc:
//		Class for representing DXL merge operators
//
//---------------------------------------------------------------------------
class CDXLPhysicalMergeJoin : public CDXLPhysicalJoin
{
private:
	// true if outer relation has unique values for the merge key
	BOOL m_is_unique_outer;

public:
	CDXLPhysicalMergeJoin(const CDXLPhysicalMergeJoin &) = delete;

	// ctor
	CDXLPhysicalMergeJoin(CMemoryPool *mp, EdxlJoinType join_type,
						  BOOL is_unique_outer);

	// accessors
	Edxlopid GetDXLOperator() const override;
	const CWStringConst *GetOpNameStr() const override;

	// serialize operator in DXL format
	void SerializeToDXL(CXMLSerializer *xml_serializer,
						const CDXLNode *dxlnode) const override;

	// conversion function
	static CDXLPhysicalMergeJoin *
	Cast(CDXLOperator *dxl_op)
	{
		GPOS_ASSERT(nullptr != dxl_op);
		GPOS_ASSERT(EdxlopPhysicalMergeJoin == dxl_op->GetDXLOperator());

		return dynamic_cast<CDXLPhysicalMergeJoin *>(dxl_op);
	}

#ifdef GPOS_DEBUG
	// checks whether the operator has valid structure, i.e. number and
	// types of child nodes
	void AssertValid(const CDXLNode *, BOOL validate_children) const override;
#endif	// GPOS_DEBUG
};
}  // namespace gpdxl
#endif	// !GPDXL_CDXLPhysicalMergeJoin_H

// EOF

相关信息

greenplumn 源码目录

相关文章

greenplumn CDXLColDescr 源码

greenplumn CDXLColRef 源码

greenplumn CDXLCtasStorageOptions 源码

greenplumn CDXLDatum 源码

greenplumn CDXLDatumBool 源码

greenplumn CDXLDatumGeneric 源码

greenplumn CDXLDatumInt2 源码

greenplumn CDXLDatumInt4 源码

greenplumn CDXLDatumInt8 源码

greenplumn CDXLDatumOid 源码

0  赞