greenplumn CQueryToDXLResult 源码

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

greenplumn CQueryToDXLResult 代码

文件路径:/src/backend/gporca/libnaucrates/src/base/CQueryToDXLResult.cpp

//---------------------------------------------------------------------------
//	Greenplum Database
//	Copyright (C) 2011 EMC Corp.
//
//	@filename:
//		CQueryToDXLResult.cpp
//
//	@doc:
//		Implementation of the methods for accessing the result of the translation
//---------------------------------------------------------------------------


#include "naucrates/base/CQueryToDXLResult.h"


using namespace gpdxl;
using namespace gpos;

//---------------------------------------------------------------------------
//	@function:
//		CQueryToDXLResult::CQueryToDXLResult
//
//	@doc:
//		Ctor
//
//---------------------------------------------------------------------------
CQueryToDXLResult::CQueryToDXLResult(CDXLNode *query,
									 CDXLNodeArray *query_output,
									 CDXLNodeArray *cte_producers)
	: m_query_dxl(query),
	  m_query_output(query_output),
	  m_cte_producers(cte_producers)
{
	GPOS_ASSERT(nullptr != query);
}

//---------------------------------------------------------------------------
//	@function:
//		CQueryToDXLResult::~CQueryToDXLResult
//
//	@doc:
//		Dtor
//
//---------------------------------------------------------------------------
CQueryToDXLResult::~CQueryToDXLResult()
{
	m_query_dxl->Release();
	CRefCount::SafeRelease(m_query_output);
	CRefCount::SafeRelease(m_cte_producers);
}

//---------------------------------------------------------------------------
//	@function:
//		CQueryToDXLResult::GetOutputColumnsDXLArray
//
//	@doc:
//		Return the array of dxl nodes representing the query output
//
//---------------------------------------------------------------------------
const CDXLNodeArray *
CQueryToDXLResult::GetOutputColumnsDXLArray() const
{
	return m_query_output;
}

//---------------------------------------------------------------------------
//	@function:
//		CQueryToDXLResult::GetCTEProducerDXLArray
//
//	@doc:
//		Return the array of CTEs
//
//---------------------------------------------------------------------------
const CDXLNodeArray *
CQueryToDXLResult::GetCTEProducerDXLArray() const
{
	return m_cte_producers;
}

//---------------------------------------------------------------------------
//	@function:
//		CQueryToDXLResult::CreateDXLNode
//
//	@doc:
//		Return the DXL node representing the query
//
//---------------------------------------------------------------------------
const CDXLNode *
CQueryToDXLResult::CreateDXLNode() const
{
	return m_query_dxl;
}



// EOF

相关信息

greenplumn 源码目录

相关文章

greenplumn CDatumBoolGPDB 源码

greenplumn CDatumGenericGPDB 源码

greenplumn CDatumInt2GPDB 源码

greenplumn CDatumInt4GPDB 源码

greenplumn CDatumInt8GPDB 源码

greenplumn CDatumOidGPDB 源码

greenplumn IDatum 源码

0  赞