greenplumn CDXLPhysicalSequence 代码
文件路径:/src/backend/gporca/libnaucrates/src/operators/CDXLPhysicalSequence.cpp
/---------------------------------------------------------------------------
/ Greenplum Database
/ Copyright (C) 2012 EMC Corp.
/
/ @filename:
/ CDXLPhysicalSequence.cpp
/
/ @doc:
/ Implementation of DXL physical sequence operator
/---------------------------------------------------------------------------
#include "naucrates/dxl/operators/CDXLPhysicalSequence.h"
#include "naucrates/dxl/operators/CDXLNode.h"
#include "naucrates/dxl/xml/CXMLSerializer.h"
using namespace gpos;
using namespace gpdxl;
/---------------------------------------------------------------------------
/ @function:
/ CDXLPhysicalSequence::CDXLPhysicalSequence
/
/ @doc:
/ Constructor
/
/---------------------------------------------------------------------------
CDXLPhysicalSequence::CDXLPhysicalSequence(CMemoryPool *mp) : CDXLPhysical(mp)
{
}
/---------------------------------------------------------------------------
/ @function:
/ CDXLPhysicalSequence::~CDXLPhysicalSequence
/
/ @doc:
/ Destructor
/
/---------------------------------------------------------------------------
CDXLPhysicalSequence::~CDXLPhysicalSequence() = default;
/---------------------------------------------------------------------------
/ @function:
/ CDXLPhysicalSequence::GetDXLOperator
/
/ @doc:
/ Operator type
/
/---------------------------------------------------------------------------
Edxlopid
CDXLPhysicalSequence::GetDXLOperator() const
{
return EdxlopPhysicalSequence;
}
/---------------------------------------------------------------------------
/ @function:
/ CDXLPhysicalSequence::GetOpNameStr
/
/ @doc:
/ Operator name
/
/---------------------------------------------------------------------------
const CWStringConst *
CDXLPhysicalSequence::GetOpNameStr() const
{
return CDXLTokens::GetDXLTokenStr(EdxltokenPhysicalSequence);
}
/---------------------------------------------------------------------------
/ @function:
/ CDXLPhysicalSequence::SerializeToDXL
/
/ @doc:
/ Serialize operator in DXL format
/
/---------------------------------------------------------------------------
void
CDXLPhysicalSequence::SerializeToDXL(CXMLSerializer *xml_serializer,
const CDXLNode *dxlnode) const
{
const CWStringConst *element_name = GetOpNameStr();
xml_serializer->OpenElement(
CDXLTokens::GetDXLTokenStr(EdxltokenNamespacePrefix), element_name);
/ serialize properties
dxlnode->SerializePropertiesToDXL(xml_serializer);
/ serialize children
dxlnode->SerializeChildrenToDXL(xml_serializer);
xml_serializer->CloseElement(
CDXLTokens::GetDXLTokenStr(EdxltokenNamespacePrefix), element_name);
}
#ifdef GPOS_DEBUG
/---------------------------------------------------------------------------
/ @function:
/ CDXLPhysicalSequence::AssertValid
/
/ @doc:
/ Checks whether operator node is well-structured
/
/---------------------------------------------------------------------------
void
CDXLPhysicalSequence::AssertValid(const CDXLNode *dxlnode,
BOOL validate_children) const
{
const ULONG arity = dxlnode->Arity();
GPOS_ASSERT(1 < arity);
for (ULONG ul = 1; ul < arity; ul++)
{
CDXLNode *child_dxlnode = (*dxlnode)[ul];
GPOS_ASSERT(EdxloptypePhysical ==
child_dxlnode->GetOperator()->GetDXLOperatorType());
if (validate_children)
{
child_dxlnode->GetOperator()->AssertValid(child_dxlnode,
validate_children);
}
}
}
#endif / GPOS_DEBUG
/ EOF
相关信息
相关文章
greenplumn CDXLCtasStorageOptions 源码