greenplumn CEnfdPartitionPropagation 源码

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

greenplumn CEnfdPartitionPropagation 代码

文件路径:/src/backend/gporca/libgpopt/include/gpopt/base/CEnfdPartitionPropagation.h

//---------------------------------------------------------------------------
//	Greenplum Database
//	Copyright (C) 2012 EMC Corp.
//
//	@filename:
//		CEnfdPartitionPropagation.h
//
//	@doc:
//		Enforceable partition propagation property
//---------------------------------------------------------------------------
#ifndef GPOPT_CEnfdPartitionPropagation_H
#define GPOPT_CEnfdPartitionPropagation_H

#include "gpos/base.h"

#include "gpopt/base/CEnfdProp.h"
#include "gpopt/base/CPartitionPropagationSpec.h"


namespace gpopt
{
using namespace gpos;


//---------------------------------------------------------------------------
//	@class:
//		CEnfdPartitionPropagation
//
//	@doc:
//		Enforceable distribution property;
//
//---------------------------------------------------------------------------
class CEnfdPartitionPropagation : public CEnfdProp
{
public:
	// type of partition matching function(s)
	enum EPartitionPropagationMatching
	{
		EppmSatisfy = 0,
		EppmSentinel
	};

private:
	// partition propagation spec
	CPartitionPropagationSpec *m_ppps;

	// partition propagation matching type
	EPartitionPropagationMatching m_eppm;


public:
	CEnfdPartitionPropagation(const CEnfdPartitionPropagation &) = delete;

	// ctor
	CEnfdPartitionPropagation(CPartitionPropagationSpec *ppps,
							  EPartitionPropagationMatching eppm);

	// dtor
	~CEnfdPartitionPropagation() override;

	// partition spec accessor
	CPropSpec *
	Pps() const override
	{
		return m_ppps;
	}

	// hash function
	ULONG HashValue() const override;

	// required propagation accessor
	CPartitionPropagationSpec *
	PppsRequired() const
	{
		return m_ppps;
	}

	// get distribution enforcing type for the given operator
	EPropEnforcingType Epet(CExpressionHandle &exprhdl, CPhysical *popPhysical,
							BOOL fPropagationReqd) const;

	// return matching type
	EPartitionPropagationMatching
	Eppm() const
	{
		return m_eppm;
	}

	// matching function
	BOOL Matches(CEnfdPartitionPropagation *pepp);

	BOOL FCompatible(CPartitionPropagationSpec *pps_drvd) const;

	// print function
	IOstream &OsPrint(IOstream &os) const override;

	// name of propagation matching type
	static const CHAR *SzPropagationMatching(
		EPartitionPropagationMatching eppm);

};	// class CEnfdPartitionPropagation

}  // namespace gpopt


#endif	// !GPOPT_CEnfdPartitionPropagation_H

// EOF

相关信息

greenplumn 源码目录

相关文章

greenplumn CAutoOptCtxt 源码

greenplumn CCTEInfo 源码

greenplumn CCTEMap 源码

greenplumn CCTEReq 源码

greenplumn CCastUtils 源码

greenplumn CColConstraintsArrayMapper 源码

greenplumn CColConstraintsHashMapper 源码

greenplumn CColRef 源码

greenplumn CColRefComputed 源码

greenplumn CColRefSet 源码

0  赞