本文整理汇总了C++中DrgPul::Append方法的典型用法代码示例。如果您正苦于以下问题:C++ DrgPul::Append方法的具体用法?C++ DrgPul::Append怎么用?C++ DrgPul::Append使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DrgPul
的用法示例。
在下文中一共展示了DrgPul::Append方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: DrgPul
//---------------------------------------------------------------------------
// @function:
// CColRef::Pdrgpul
//
// @doc:
// Extract array of colids from array of colrefs
//
//---------------------------------------------------------------------------
DrgPul *
CColRef::Pdrgpul
(
IMemoryPool *pmp,
DrgPcr *pdrgpcr
)
{
DrgPul *pdrgpul = GPOS_NEW(pmp) DrgPul(pmp);
const ULONG ulLen = pdrgpcr->UlLength();
for (ULONG ul = 0; ul < ulLen; ul++)
{
CColRef *pcr = (*pdrgpcr)[ul];
pdrgpul->Append(GPOS_NEW(pmp) ULONG(pcr->UlId()));
}
return pdrgpul;
}
示例2: DrgPul
//---------------------------------------------------------------------------
// @function:
// CPhysicalUnionAll::PdrgpulMap
//
// @doc:
// Map given array of scalar identifier expressions to positions of
// UnionAll input columns in the given child;
// the function returns NULL if no mapping could be constructed
//
//---------------------------------------------------------------------------
DrgPul *
CPhysicalUnionAll::PdrgpulMap
(
IMemoryPool *pmp,
DrgPexpr *pdrgpexpr,
ULONG ulChildIndex
)
const
{
GPOS_ASSERT(NULL != pdrgpexpr);
DrgPcr *pdrgpcr = (*m_pdrgpdrgpcrInput)[ulChildIndex];
const ULONG ulExprs = pdrgpexpr->UlLength();
const ULONG ulCols = pdrgpcr->UlLength();
DrgPul *pdrgpul = GPOS_NEW(pmp) DrgPul(pmp);
for (ULONG ulExpr = 0; ulExpr < ulExprs; ulExpr++)
{
CExpression *pexpr = (*pdrgpexpr)[ulExpr];
if (COperator::EopScalarIdent != pexpr->Pop()->Eopid())
{
continue;
}
const CColRef *pcr = CScalarIdent::PopConvert(pexpr->Pop())->Pcr();
for (ULONG ulCol = 0; ulCol < ulCols; ulCol++)
{
if ((*pdrgpcr)[ulCol] == pcr)
{
pdrgpul->Append(GPOS_NEW(pmp) ULONG(ulCol));
}
}
}
if (0 == pdrgpul->UlLength())
{
// mapping failed
pdrgpul->Release();
pdrgpul = NULL;
}
return pdrgpul;
}
示例3: pimi
//---------------------------------------------------------------------------
// @function:
// CPartIndexMap::PdrgpulScanIds
//
// @doc:
// Extract scan ids
//
//---------------------------------------------------------------------------
DrgPul *
CPartIndexMap::PdrgpulScanIds
(
IMemoryPool *pmp,
BOOL fConsumersOnly
)
const
{
DrgPul *pdrgpul = GPOS_NEW(pmp) DrgPul(pmp);
PartIndexMapIter pimi(m_pim);
while (pimi.FAdvance())
{
const CPartTableInfo *ppti = pimi.Pt();
if (fConsumersOnly && EpimConsumer != ppti->Epim())
{
continue;
}
pdrgpul->Append(GPOS_NEW(pmp) ULONG(ppti->UlScanId()));
}
return pdrgpul;
}