greenplumn CPropSpec 源码

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

greenplumn CPropSpec 代码

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

//---------------------------------------------------------------------------
//	Greenplum Database
//	Copyright (C) 2011 EMC Corp.
//
//	@filename:
//		CPropSpec.h
//
//	@doc:
//		Abstraction for specification of properties;
//---------------------------------------------------------------------------
#ifndef GPOPT_CPropSpec_H
#define GPOPT_CPropSpec_H

#include "gpos/base.h"
#include "gpos/common/CRefCount.h"

#include "gpopt/operators/CExpression.h"

namespace gpopt
{
using namespace gpos;

// prototypes
class CReqdPropPlan;

//---------------------------------------------------------------------------
//	@class:
//		CPropSpec
//
//	@doc:
//		Property specification
//
//---------------------------------------------------------------------------
class CPropSpec : public CRefCount, public DbgPrintMixin<CPropSpec>
{
public:
	// property type
	enum EPropSpecType
	{
		EpstOrder,
		EpstDistribution,
		EpstRewindability,
		EpstPartPropagation,

		EpstSentinel
	};

private:
protected:
	// ctor
	CPropSpec() = default;

	// dtor
	~CPropSpec() override = default;

public:
	CPropSpec(const CPropSpec &) = delete;

	// append enforcers to dynamic array for the given plan properties
	virtual void AppendEnforcers(CMemoryPool *mp, CExpressionHandle &exprhdl,
								 CReqdPropPlan *prpp,
								 CExpressionArray *pdrgpexpr,
								 CExpression *pexpr) = 0;

	// hash function
	virtual ULONG HashValue() const = 0;

	// extract columns used by the property
	virtual CColRefSet *PcrsUsed(CMemoryPool *mp) const = 0;

	// property type
	virtual EPropSpecType Epst() const = 0;

	virtual gpos::IOstream &OsPrint(gpos::IOstream &os) const = 0;

};	// class CPropSpec


// shorthand for printing
inline IOstream &
operator<<(IOstream &os, const CPropSpec &ospec)
{
	return ospec.OsPrint(os);
}

}  // namespace gpopt

FORCE_GENERATE_DBGSTR(gpopt::CPropSpec);

#endif	// !GPOPT_CPropSpec_H

// EOF

相关信息

greenplumn 源码目录

相关文章

greenplumn CAutoOptCtxt 源码

greenplumn CCTEInfo 源码

greenplumn CCTEMap 源码

greenplumn CCTEReq 源码

greenplumn CCastUtils 源码

greenplumn CColConstraintsArrayMapper 源码

greenplumn CColConstraintsHashMapper 源码

greenplumn CColRef 源码

greenplumn CColRefComputed 源码

greenplumn CColRefSet 源码

0  赞