Пример #1
0
//---------------------------------------------------------------------------
//	@function:
//		CDXLPhysicalLimit::SerializeToDXL
//
//	@doc:
//		Serialize operator in DXL format
//
//---------------------------------------------------------------------------
void
CDXLPhysicalLimit::SerializeToDXL
	(
	CXMLSerializer *pxmlser,
	const CDXLNode *pdxln
	)
	const
{
	const CWStringConst *pstrElemName = PstrOpName();

	pxmlser->OpenElement(CDXLTokens::PstrToken(EdxltokenNamespacePrefix), pstrElemName);

	// serialize properties
	pdxln->SerializePropertiesToDXL(pxmlser);

	// serialize children nodes

	const DrgPdxln *pdrgpdxln = pdxln->PdrgpdxlnChildren();

	GPOS_ASSERT(4 == pdxln->UlArity());
	// serialize the first two children: target-list and plan
	for (ULONG i = 0; i < 4; i++)
	{
		CDXLNode *pdxlnChild = (*pdrgpdxln)[i];
		pdxlnChild->SerializeToDXL(pxmlser);
	}

	pxmlser->CloseElement(CDXLTokens::PstrToken(EdxltokenNamespacePrefix), pstrElemName);
}
Пример #2
0
//---------------------------------------------------------------------------
//	@function:
//		CDXLNode::SerializeChildrenToDXL
//
//	@doc:
//		Serializes the node's children in DXL format
//
//---------------------------------------------------------------------------
void
CDXLNode::SerializeChildrenToDXL
	(
	CXMLSerializer *pxmlser
	)
	const
{
	// serialize children nodes
	const ULONG ulArity = UlArity();
	for (ULONG i = 0; i < ulArity; i++)
	{
		GPOS_CHECK_ABORT;

		CDXLNode *pdxlnChild = (*m_pdrgpdxln)[i];
		pdxlnChild->SerializeToDXL(pxmlser);

		GPOS_CHECK_ABORT;
	}
}