greenplumn CDXLProperties 源码

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

greenplumn CDXLProperties 代码

文件路径:/src/backend/gporca/libnaucrates/src/operators/CDXLProperties.cpp

//---------------------------------------------------------------------------
//	Greenplum Database
//	Copyright (C) 2012 EMC Corp.
//
//	@filename:
//		CDXLProperties.cpp
//
//	@doc:
//		Implementation of properties of DXL operators
//---------------------------------------------------------------------------

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

#include "naucrates/dxl/xml/CXMLSerializer.h"

using namespace gpdxl;

//---------------------------------------------------------------------------
//	@function:
//		CDXLProperties::CDXLProperties
//
//	@doc:
//		Ctor
//
//---------------------------------------------------------------------------
CDXLProperties::CDXLProperties() = default;

//---------------------------------------------------------------------------
//	@function:
//		CDXLProperties::~CDXLProperties
//
//	@doc:
//		Dtor
//
//---------------------------------------------------------------------------
CDXLProperties::~CDXLProperties()
{
	CRefCount::SafeRelease(m_dxl_stats_derived_relation);
}

//---------------------------------------------------------------------------
//	@function:
//		CDXLProperties::SetStats
//
//	@doc:
//		Set operator properties
//
//---------------------------------------------------------------------------
void
CDXLProperties::SetStats(CDXLStatsDerivedRelation *dxl_stats_derived_relation)
{
	// allow setting properties only once
	GPOS_ASSERT(nullptr == m_dxl_stats_derived_relation);
	GPOS_ASSERT(nullptr != dxl_stats_derived_relation);
	m_dxl_stats_derived_relation = dxl_stats_derived_relation;
}

//---------------------------------------------------------------------------
//	@function:
//		CDXLProperties::GetDxlStatsDrvdRelation
//
//	@doc:
//		Return operator's statistical information
//
//---------------------------------------------------------------------------
const CDXLStatsDerivedRelation *
CDXLProperties::GetDxlStatsDrvdRelation() const
{
	return m_dxl_stats_derived_relation;
}

//---------------------------------------------------------------------------
//	@function:
//		CDXLProperties::SerializePropertiesToDXL
//
//	@doc:
//		Serialize operator statistics in DXL format
//
//---------------------------------------------------------------------------
void
CDXLProperties::SerializePropertiesToDXL(CXMLSerializer *xml_serializer) const
{
	SerializeStatsToDXL(xml_serializer);
}

//---------------------------------------------------------------------------
//	@function:
//		CDXLProperties::SerializeStatsToDXL
//
//	@doc:
//		Serialize operator statistics in DXL format
//
//---------------------------------------------------------------------------
void
CDXLProperties::SerializeStatsToDXL(CXMLSerializer *xml_serializer) const
{
	if (nullptr != m_dxl_stats_derived_relation)
	{
		m_dxl_stats_derived_relation->Serialize(xml_serializer);
	}
}

// EOF

相关信息

greenplumn 源码目录

相关文章

greenplumn CDXLColDescr 源码

greenplumn CDXLColRef 源码

greenplumn CDXLCtasStorageOptions 源码

greenplumn CDXLDatum 源码

greenplumn CDXLDatumBool 源码

greenplumn CDXLDatumGeneric 源码

greenplumn CDXLDatumInt2 源码

greenplumn CDXLDatumInt4 源码

greenplumn CDXLDatumInt8 源码

greenplumn CDXLDatumOid 源码

0  赞