greenplumn CScalarDMLAction 源码

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

greenplumn CScalarDMLAction 代码

文件路径:/src/backend/gporca/libgpopt/include/gpopt/operators/CScalarDMLAction.h

//---------------------------------------------------------------------------
//	Greenplum Database
//	Copyright (C) 2012 EMC Corp.
//
//	@filename:
//		CScalarDMLAction.h
//
//	@doc:
//		Scalar DML action operator
//---------------------------------------------------------------------------
#ifndef GPOPT_CScalarDMLAction_H
#define GPOPT_CScalarDMLAction_H

#include "gpos/base.h"

#include "gpopt/base/CDrvdProp.h"
#include "gpopt/operators/CScalar.h"

namespace gpopt
{
using namespace gpos;

//---------------------------------------------------------------------------
//	@class:
//		CScalarDMLAction
//
//	@doc:
//		Scalar casting operator
//
//---------------------------------------------------------------------------
class CScalarDMLAction : public CScalar
{
private:
public:
	CScalarDMLAction(const CScalarDMLAction &) = delete;

	// dml action specification
	enum EDMLAction
	{
		EdmlactionDelete,
		EdmlactionInsert
	};

	// ctor
	CScalarDMLAction(CMemoryPool *mp) : CScalar(mp)
	{
	}

	// dtor
	~CScalarDMLAction() override = default;
	// ident accessors

	// the type of the scalar expression
	IMDId *MdidType() const override;

	EOperatorId
	Eopid() const override
	{
		return EopScalarDMLAction;
	}

	// return a string for operator name
	const CHAR *
	SzId() const override
	{
		return "CScalarDMLAction";
	}

	// match function
	BOOL Matches(COperator *pop) const override;

	// sensitivity to order of inputs
	BOOL
	FInputOrderSensitive() const override
	{
		return false;
	}

	// return a copy of the operator with remapped columns
	COperator *
	PopCopyWithRemappedColumns(CMemoryPool *,		//mp,
							   UlongToColRefMap *,	//colref_mapping,
							   BOOL					//must_exist
							   ) override
	{
		return PopCopyDefault();
	}

	// conversion function
	static CScalarDMLAction *
	PopConvert(COperator *pop)
	{
		GPOS_ASSERT(nullptr != pop);
		GPOS_ASSERT(EopScalarDMLAction == pop->Eopid());

		return dynamic_cast<CScalarDMLAction *>(pop);
	}

};	// class CScalarDMLAction
}  // namespace gpopt

#endif	// !GPOPT_CScalarDMLAction_H

// EOF

相关信息

greenplumn 源码目录

相关文章

greenplumn CExpression 源码

greenplumn CExpressionFactorizer 源码

greenplumn CExpressionHandle 源码

greenplumn CExpressionPreprocessor 源码

greenplumn CExpressionUtils 源码

greenplumn CHashedDistributions 源码

greenplumn CLogical 源码

greenplumn CLogicalApply 源码

greenplumn CLogicalAssert 源码

greenplumn CLogicalBitmapTableGet 源码

0  赞