greenplumn CDXLPhysicalRedistributeMotion 源码

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

greenplumn CDXLPhysicalRedistributeMotion 代码

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

//---------------------------------------------------------------------------
//	Greenplum Database
//	Copyright (C) 2010 Greenplum, Inc.
//
//	@filename:
//		CDXLPhysicalRedistributeMotion.h
//
//	@doc:
//		Class for representing DXL Redistribute motion operators.
//---------------------------------------------------------------------------



#ifndef GPDXL_CDXLPhysicalRedistributeMotion_H
#define GPDXL_CDXLPhysicalRedistributeMotion_H

#include "gpos/base.h"

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

namespace gpdxl
{
// indices of redistribute motion elements in the children array
enum Edxlrm
{
	EdxlrmIndexProjList = 0,
	EdxlrmIndexFilter,
	EdxlrmIndexSortColList,
	EdxlrmIndexHashExprList,
	EdxlrmIndexChild,
	EdxlrmIndexSentinel
};



//---------------------------------------------------------------------------
//	@class:
//		CDXLPhysicalRedistributeMotion
//
//	@doc:
//		Class for representing DXL redistribute motion operators
//
//---------------------------------------------------------------------------
class CDXLPhysicalRedistributeMotion : public CDXLPhysicalMotion
{
private:
	// is this a duplicate sensitive redistribute motion
	BOOL m_is_duplicate_sensitive;


public:
	CDXLPhysicalRedistributeMotion(const CDXLPhysicalRedistributeMotion &) =
		delete;

	// ctor
	CDXLPhysicalRedistributeMotion(CMemoryPool *mp,
								   BOOL is_duplicate_sensitive);

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

	// does motion remove duplicates
	BOOL
	IsDuplicateSensitive() const
	{
		return m_is_duplicate_sensitive;
	}

	// index of relational child node in the children array
	ULONG
	GetRelationChildIdx() const override
	{
		return EdxlrmIndexChild;
	}

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

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

		return dynamic_cast<CDXLPhysicalRedistributeMotion *>(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_CDXLPhysicalRedistributeMotion_H

// EOF

相关信息

greenplumn 源码目录

相关文章

greenplumn CDXLColDescr 源码

greenplumn CDXLColRef 源码

greenplumn CDXLCtasStorageOptions 源码

greenplumn CDXLDatum 源码

greenplumn CDXLDatumBool 源码

greenplumn CDXLDatumGeneric 源码

greenplumn CDXLDatumInt2 源码

greenplumn CDXLDatumInt4 源码

greenplumn CDXLDatumInt8 源码

greenplumn CDXLDatumOid 源码

0  赞