greenplumn CDXLScalarHashExprList 代码
文件路径:/src/backend/gporca/libnaucrates/src/operators/CDXLScalarHashExprList.cpp
/---------------------------------------------------------------------------
/ Greenplum Database
/ Copyright (C) 2010 Greenplum, Inc.
/
/ @filename:
/ CDXLScalarHashExprList.cpp
/
/ @doc:
/ Implementation of DXL hash expression lists for redistribute operators
/---------------------------------------------------------------------------
#include "naucrates/dxl/operators/CDXLScalarHashExprList.h"
#include "naucrates/dxl/operators/CDXLNode.h"
#include "naucrates/dxl/xml/CXMLSerializer.h"
using namespace gpos;
using namespace gpdxl;
/---------------------------------------------------------------------------
/ @function:
/ CDXLScalarHashExprList::CDXLScalarHashExprList
/
/ @doc:
/ Constructor
/
/---------------------------------------------------------------------------
CDXLScalarHashExprList::CDXLScalarHashExprList(CMemoryPool *mp) : CDXLScalar(mp)
{
}
/---------------------------------------------------------------------------
/ @function:
/ CDXLScalarHashExprList::GetDXLOperator
/
/ @doc:
/ Operator type
/
/---------------------------------------------------------------------------
Edxlopid
CDXLScalarHashExprList::GetDXLOperator() const
{
return EdxlopScalarHashExprList;
}
/---------------------------------------------------------------------------
/ @function:
/ CDXLScalarHashExprList::GetOpNameStr
/
/ @doc:
/ Operator name
/
/---------------------------------------------------------------------------
const CWStringConst *
CDXLScalarHashExprList::GetOpNameStr() const
{
return CDXLTokens::GetDXLTokenStr(EdxltokenScalarHashExprList);
}
/---------------------------------------------------------------------------
/ @function:
/ CDXLScalarHashExprList::SerializeToDXL
/
/ @doc:
/ Serialize operator in DXL format
/
/---------------------------------------------------------------------------
void
CDXLScalarHashExprList::SerializeToDXL(CXMLSerializer *xml_serializer,
const CDXLNode *node) const
{
const CWStringConst *element_name = GetOpNameStr();
xml_serializer->OpenElement(
CDXLTokens::GetDXLTokenStr(EdxltokenNamespacePrefix), element_name);
node->SerializeChildrenToDXL(xml_serializer);
xml_serializer->CloseElement(
CDXLTokens::GetDXLTokenStr(EdxltokenNamespacePrefix), element_name);
}
#ifdef GPOS_DEBUG
/---------------------------------------------------------------------------
/ @function:
/ CDXLScalarHashExprList::AssertValid
/
/ @doc:
/ Checks whether operator node is well-structured
/
/---------------------------------------------------------------------------
void
CDXLScalarHashExprList::AssertValid(const CDXLNode *node,
BOOL validate_children) const
{
const ULONG arity = node->Arity();
GPOS_ASSERT(1 <= arity);
for (ULONG ul = 0; ul < arity; ul++)
{
CDXLNode *child_dxlnode = (*node)[ul];
GPOS_ASSERT(EdxlopScalarHashExpr ==
child_dxlnode->GetOperator()->GetDXLOperator());
if (validate_children)
{
child_dxlnode->GetOperator()->AssertValid(child_dxlnode,
validate_children);
}
}
}
#endif / GPOS_DEBUG
/ EOF
相关信息
相关文章
greenplumn CDXLCtasStorageOptions 源码