本文整理汇总了C++中DrgPpartkeys::Append方法的典型用法代码示例。如果您正苦于以下问题:C++ DrgPpartkeys::Append方法的具体用法?C++ DrgPpartkeys::Append怎么用?C++ DrgPpartkeys::Append使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DrgPpartkeys
的用法示例。
在下文中一共展示了DrgPpartkeys::Append方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: GPOS_NEW
//---------------------------------------------------------------------------
// @function:
// CPartInfo::CPartInfoEntry::PpartinfoentryAddRemappedKeys
//
// @doc:
// Create a copy of the current object, and add a set of remapped
// part keys to this entry, using the existing keys and the given hashmap
//
//---------------------------------------------------------------------------
CPartInfo::CPartInfoEntry *
CPartInfo::CPartInfoEntry::PpartinfoentryAddRemappedKeys
(
IMemoryPool *pmp,
CColRefSet *pcrs,
HMUlCr *phmulcr
)
{
GPOS_ASSERT(NULL != pcrs);
GPOS_ASSERT(NULL != phmulcr);
DrgPpartkeys *pdrgppartkeys = CPartKeys::PdrgppartkeysCopy(pmp, m_pdrgppartkeys);
const ULONG ulSize = m_pdrgppartkeys->UlLength();
for (ULONG ul = 0; ul < ulSize; ul++)
{
CPartKeys *ppartkeys = (*m_pdrgppartkeys)[ul];
if (ppartkeys->FOverlap(pcrs))
{
pdrgppartkeys->Append(ppartkeys->PpartkeysRemap(pmp, phmulcr));
break;
}
}
m_pmdid->AddRef();
CPartConstraint *ppartcnstrRel = m_ppartcnstrRel->PpartcnstrCopyWithRemappedColumns(pmp, phmulcr, false /*fMustExist*/);
return GPOS_NEW(pmp) CPartInfoEntry(m_ulScanId, m_pmdid, pdrgppartkeys, ppartcnstrRel);
}
示例2: CPartIndexMap
//---------------------------------------------------------------------------
// @function:
// CPhysicalScan::PpimDeriveFromDynamicScan
//
// @doc:
// Derive partition index map from a dynamic scan operator
//
//---------------------------------------------------------------------------
CPartIndexMap *
CPhysicalScan::PpimDeriveFromDynamicScan
(
IMemoryPool *pmp,
ULONG ulPartIndexId,
IMDId *pmdidRel,
DrgDrgPcr *pdrgpdrgpcrPart,
ULONG ulSecondaryPartIndexId,
CPartConstraint *ppartcnstr,
CPartConstraint *ppartcnstrRel,
ULONG ulExpectedPropagators
)
{
CPartIndexMap *ppim = GPOS_NEW(pmp) CPartIndexMap(pmp);
PartCnstrMap *ppartcnstrmap = GPOS_NEW(pmp) PartCnstrMap(pmp);
(void) ppartcnstrmap->FInsert(GPOS_NEW(pmp) ULONG(ulSecondaryPartIndexId), ppartcnstr);
DrgPpartkeys *pdrgppartkeys = GPOS_NEW(pmp) DrgPpartkeys(pmp);
pdrgppartkeys->Append(GPOS_NEW(pmp) CPartKeys(pdrgpdrgpcrPart));
ppim->Insert(ulPartIndexId, ppartcnstrmap, CPartIndexMap::EpimConsumer, ulExpectedPropagators, pmdidRel, pdrgppartkeys, ppartcnstrRel);
return ppim;
}
示例3: DrgPpartkeys
//---------------------------------------------------------------------------
// @function:
// CPhysicalPartitionSelector::PpimDerive
//
// @doc:
// Derive partition index map
//
//---------------------------------------------------------------------------
CPartIndexMap *
CPhysicalPartitionSelector::PpimDerive
(
IMemoryPool *pmp,
CExpressionHandle &exprhdl,
CDrvdPropCtxt *pdpctxt
)
const
{
GPOS_ASSERT(NULL != pdpctxt);
CDrvdPropPlan *pdpplan = exprhdl.Pdpplan(0 /*ulChildIndex*/);
CPartIndexMap *ppimInput = pdpplan->Ppim();
GPOS_ASSERT(NULL != ppimInput);
ULONG ulExpectedPartitionSelectors = CDrvdPropCtxtPlan::PdpctxtplanConvert(pdpctxt)->UlExpectedPartitionSelectors();
CPartIndexMap *ppim = ppimInput->PpimPartitionSelector(pmp, m_ulScanId, ulExpectedPartitionSelectors);
if (!ppim->FContains(m_ulScanId))
{
// the consumer of this scan id does not come from the child, i.e. it
// is on the other side of a join
Pmdid()->AddRef();
m_pdrgpdrgpcr->AddRef();
m_ppartcnstrmap->AddRef();
m_ppartcnstr->AddRef();
DrgPpartkeys *pdrgppartkeys = GPOS_NEW(pmp) DrgPpartkeys(pmp);
pdrgppartkeys->Append(GPOS_NEW(pmp) CPartKeys(m_pdrgpdrgpcr));
ppim->Insert(m_ulScanId, m_ppartcnstrmap, CPartIndexMap::EpimPropagator, 0 /*ulExpectedPropagators*/, Pmdid(), pdrgppartkeys, m_ppartcnstr);
}
return ppim;
}
示例4: DrgPpartkeys
//---------------------------------------------------------------------------
// @function:
// CPartInfo::AddPartConsumer
//
// @doc:
// Add part table consumer
//
//---------------------------------------------------------------------------
void
CPartInfo::AddPartConsumer
(
IMemoryPool *pmp,
ULONG ulScanId,
IMDId *pmdid,
DrgDrgPcr *pdrgpdrgpcrPart,
CPartConstraint *ppartcnstrRel
)
{
DrgPpartkeys *pdrgppartkeys = GPOS_NEW(pmp) DrgPpartkeys(pmp);
pdrgppartkeys->Append(GPOS_NEW(pmp) CPartKeys(pdrgpdrgpcrPart));
m_pdrgppartentries->Append(GPOS_NEW(pmp) CPartInfoEntry(ulScanId, pmdid, pdrgppartkeys, ppartcnstrRel));
}
示例5: DrgPpartkeys
//---------------------------------------------------------------------------
// @function:
// CPartKeys::PdrgppartkeysCopy
//
// @doc:
// Copy array of part keys into given memory pool
//
//---------------------------------------------------------------------------
DrgPpartkeys *
CPartKeys::PdrgppartkeysCopy
(
IMemoryPool *pmp,
const DrgPpartkeys *pdrgppartkeys
)
{
GPOS_ASSERT(NULL != pdrgppartkeys);
DrgPpartkeys *pdrgppartkeysCopy = GPOS_NEW(pmp) DrgPpartkeys(pmp);
const ULONG ulLength = pdrgppartkeys->UlLength();
for (ULONG ul = 0; ul < ulLength; ul++)
{
pdrgppartkeysCopy->Append((*pdrgppartkeys)[ul]->PpartkeysCopy(pmp));
}
return pdrgppartkeysCopy;
}