greenplumn CDXLScalarCoalesce 源码

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

greenplumn CDXLScalarCoalesce 代码

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

//---------------------------------------------------------------------------
//	Greenplum Database
//	Copyright (C) 2012 EMC Corp.
//
//	@filename:
//		CDXLScalarCoalesce.h
//
//	@doc:
//		Class for representing DXL Coalesce operator
//---------------------------------------------------------------------------

#ifndef GPDXL_CDXLScalarCoalesce_H
#define GPDXL_CDXLScalarCoalesce_H

#include "gpos/base.h"

#include "naucrates/dxl/operators/CDXLScalar.h"
#include "naucrates/md/IMDId.h"

namespace gpdxl
{
using namespace gpos;
using namespace gpmd;

//---------------------------------------------------------------------------
//	@class:
//		CDXLScalarCoalesce
//
//	@doc:
//		Class for representing DXL Coalesce operator
//
//---------------------------------------------------------------------------
class CDXLScalarCoalesce : public CDXLScalar
{
private:
	// return type
	IMDId *m_mdid_type;

public:
	CDXLScalarCoalesce(const CDXLScalarCoalesce &) = delete;

	// ctor
	CDXLScalarCoalesce(CMemoryPool *mp, IMDId *mdid_type);

	//dtor
	~CDXLScalarCoalesce() override;

	// name of the operator
	const CWStringConst *GetOpNameStr() const override;

	// return type
	virtual IMDId *
	MdidType() const
	{
		return m_mdid_type;
	}

	// DXL Operator ID
	Edxlopid GetDXLOperator() const override;

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

	// does the operator return a boolean result
	BOOL HasBoolResult(CMDAccessor *md_accessor) const override;

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

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

		return dynamic_cast<CDXLScalarCoalesce *>(dxl_op);
	}
};
}  // namespace gpdxl
#endif	// !GPDXL_CDXLScalarCoalesce_H

// EOF

相关信息

greenplumn 源码目录

相关文章

greenplumn CDXLColDescr 源码

greenplumn CDXLColRef 源码

greenplumn CDXLCtasStorageOptions 源码

greenplumn CDXLDatum 源码

greenplumn CDXLDatumBool 源码

greenplumn CDXLDatumGeneric 源码

greenplumn CDXLDatumInt2 源码

greenplumn CDXLDatumInt4 源码

greenplumn CDXLDatumInt8 源码

greenplumn CDXLDatumOid 源码

0  赞