greenplumn CDXLDatumStatsDoubleMappable 源码
greenplumn CDXLDatumStatsDoubleMappable 代码
文件路径:/src/backend/gporca/libnaucrates/src/operators/CDXLDatumStatsDoubleMappable.cpp
//---------------------------------------------------------------------------
// Greenplum Database
// Copyright (C) 2014 VMware, Inc. or its affiliates.
//
// @filename:
// CDXLDatumStatsDoubleMappable.cpp
//
// @doc:
// Implementation of DXL datum of types having double mapping
//
// @owner:
//
//
// @test:
//
//---------------------------------------------------------------------------
#include "naucrates/dxl/operators/CDXLDatumStatsDoubleMappable.h"
#include "naucrates/dxl/CDXLUtils.h"
#include "naucrates/dxl/xml/CXMLSerializer.h"
using namespace gpos;
using namespace gpdxl;
//---------------------------------------------------------------------------
// @function:
// CDXLDatumStatsDoubleMappable::CDXLDatumStatsDoubleMappable
//
// @doc:
// Ctor
//
//---------------------------------------------------------------------------
CDXLDatumStatsDoubleMappable::CDXLDatumStatsDoubleMappable(
CMemoryPool *mp, IMDId *mdid_type, INT type_modifier, BOOL is_null,
BYTE *data, ULONG length, CDouble val)
: CDXLDatumGeneric(mp, mdid_type, type_modifier, is_null, data, length),
m_val(val)
{
}
//---------------------------------------------------------------------------
// @function:
// CDXLDatumStatsDoubleMappable::Serialize
//
// @doc:
// Serialize datum in DXL format
//
//---------------------------------------------------------------------------
void
CDXLDatumStatsDoubleMappable::Serialize(CXMLSerializer *xml_serializer)
{
m_mdid_type->Serialize(xml_serializer,
CDXLTokens::GetDXLTokenStr(EdxltokenTypeId));
if (default_type_modifier != TypeModifier())
{
xml_serializer->AddAttribute(
CDXLTokens::GetDXLTokenStr(EdxltokenTypeMod), TypeModifier());
}
if (!m_is_null)
{
xml_serializer->AddAttribute(CDXLTokens::GetDXLTokenStr(EdxltokenValue),
m_is_null, GetByteArray(), Length());
}
else
{
xml_serializer->AddAttribute(
CDXLTokens::GetDXLTokenStr(EdxltokenIsNull), true);
}
xml_serializer->AddAttribute(
CDXLTokens::GetDXLTokenStr(EdxltokenDoubleValue), GetDoubleMapping());
}
// EOF
相关信息
相关文章
greenplumn CDXLCtasStorageOptions 源码
0
赞
热门推荐
-
2、 - 优质文章
-
3、 gate.io
-
8、 golang
-
9、 openharmony
-
10、 Vue中input框自动聚焦