greenplumn CColRefTable 源码

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

greenplumn CColRefTable 代码

文件路径:/src/backend/gporca/libgpopt/src/base/CColRefTable.cpp

//---------------------------------------------------------------------------
//	Greenplum Database
//	Copyright (C) 2011 EMC Corp.
//
//	@filename:
//		CColRefTable.cpp
//
//	@doc:
//		Implementation of column reference class
//---------------------------------------------------------------------------

#include "gpopt/base/CColRefTable.h"

#include "gpos/base.h"

#include "naucrates/md/CMDIdGPDB.h"

using namespace gpopt;
using namespace gpmd;

//---------------------------------------------------------------------------
//	@function:
//		CColRefTable::CColRefTable
//
//	@doc:
//		Ctor
//		takes ownership of string; verify string is properly formatted
//
//---------------------------------------------------------------------------
CColRefTable::CColRefTable(const CColumnDescriptor *pcoldesc, ULONG id,
						   const CName *pname, ULONG ulOpSource)
	: CColRef(pcoldesc->RetrieveType(), pcoldesc->TypeModifier(), id, pname),
	  m_iAttno(0),
	  m_ulSourceOpId(ulOpSource),
	  m_width(pcoldesc->Width())
{
	GPOS_ASSERT(nullptr != pname);

	m_iAttno = pcoldesc->AttrNum();
	m_is_nullable = pcoldesc->IsNullable();
	m_is_dist_col = pcoldesc->IsDistCol();
}

//---------------------------------------------------------------------------
//	@function:
//		CColRefTable::CColRefTable
//
//	@doc:
//		Ctor
//		takes ownership of string; verify string is properly formatted
//
//---------------------------------------------------------------------------
CColRefTable::CColRefTable(const IMDType *pmdtype, INT type_modifier, INT attno,
						   BOOL is_nullable, ULONG id, const CName *pname,
						   ULONG ulOpSource, BOOL is_dist_col, ULONG ulWidth)
	: CColRef(pmdtype, type_modifier, id, pname),
	  m_iAttno(attno),
	  m_is_nullable(is_nullable),
	  m_ulSourceOpId(ulOpSource),
	  m_is_dist_col(is_dist_col),
	  m_width(ulWidth)
{
	GPOS_ASSERT(nullptr != pname);
}

//---------------------------------------------------------------------------
//	@function:
//		CColRefTable::~CColRefTable
//
//	@doc:
//		Dtor
//
//---------------------------------------------------------------------------
CColRefTable::~CColRefTable() = default;


// EOF

相关信息

greenplumn 源码目录

相关文章

greenplumn CAutoOptCtxt 源码

greenplumn CCTEInfo 源码

greenplumn CCTEMap 源码

greenplumn CCTEReq 源码

greenplumn CCastUtils 源码

greenplumn CColConstraintsArrayMapper 源码

greenplumn CColConstraintsHashMapper 源码

greenplumn CColRef 源码

greenplumn CColRefComputed 源码

greenplumn CColRefSet 源码

0  赞