greenplumn CDXLScalarPartDefault 源码
greenplumn CDXLScalarPartDefault 代码
文件路径:/src/backend/gporca/libnaucrates/src/operators/CDXLScalarPartDefault.cpp
//---------------------------------------------------------------------------
// Greenplum Database
// Copyright (C) 2014 VMware, Inc. or its affiliates.
//
// @filename:
// CDXLScalarPartDefault.cpp
//
// @doc:
// Implementation of DXL Part Default expression
//---------------------------------------------------------------------------
#include "naucrates/dxl/operators/CDXLScalarPartDefault.h"
#include "gpopt/mdcache/CMDAccessor.h"
#include "naucrates/dxl/operators/CDXLNode.h"
#include "naucrates/dxl/xml/CXMLSerializer.h"
using namespace gpopt;
using namespace gpmd;
using namespace gpos;
using namespace gpdxl;
//---------------------------------------------------------------------------
// @function:
// CDXLScalarPartDefault::CDXLScalarPartDefault
//
// @doc:
// Ctor
//
//---------------------------------------------------------------------------
CDXLScalarPartDefault::CDXLScalarPartDefault(CMemoryPool *mp,
ULONG partitioning_level)
: CDXLScalar(mp), m_partitioning_level(partitioning_level)
{
}
//---------------------------------------------------------------------------
// @function:
// CDXLScalarPartDefault::GetDXLOperator
//
// @doc:
// Operator type
//
//---------------------------------------------------------------------------
Edxlopid
CDXLScalarPartDefault::GetDXLOperator() const
{
return EdxlopScalarPartDefault;
}
//---------------------------------------------------------------------------
// @function:
// CDXLScalarPartDefault::GetOpNameStr
//
// @doc:
// Operator name
//
//---------------------------------------------------------------------------
const CWStringConst *
CDXLScalarPartDefault::GetOpNameStr() const
{
return CDXLTokens::GetDXLTokenStr(EdxltokenScalarPartDefault);
}
//---------------------------------------------------------------------------
// @function:
// CDXLScalarPartDefault::SerializeToDXL
//
// @doc:
// Serialize operator in DXL format
//
//---------------------------------------------------------------------------
void
CDXLScalarPartDefault::SerializeToDXL(CXMLSerializer *xml_serializer,
const CDXLNode * // dxlnode
) const
{
const CWStringConst *element_name = GetOpNameStr();
xml_serializer->OpenElement(
CDXLTokens::GetDXLTokenStr(EdxltokenNamespacePrefix), element_name);
xml_serializer->AddAttribute(CDXLTokens::GetDXLTokenStr(EdxltokenPartLevel),
m_partitioning_level);
xml_serializer->CloseElement(
CDXLTokens::GetDXLTokenStr(EdxltokenNamespacePrefix), element_name);
}
#ifdef GPOS_DEBUG
//---------------------------------------------------------------------------
// @function:
// CDXLScalarPartDefault::AssertValid
//
// @doc:
// Checks whether operator node is well-structured
//
//---------------------------------------------------------------------------
void
CDXLScalarPartDefault::AssertValid(const CDXLNode *dxlnode,
BOOL // validate_children
) const
{
GPOS_ASSERT(0 == dxlnode->Arity());
}
#endif // GPOS_DEBUG
// EOF
相关信息
相关文章
greenplumn CDXLCtasStorageOptions 源码
0
赞
热门推荐
-
2、 - 优质文章
-
3、 gate.io
-
7、 golang
-
9、 openharmony
-
10、 Vue中input框自动聚焦