本文整理汇总了C++中IStatistics::FEmpty方法的典型用法代码示例。如果您正苦于以下问题:C++ IStatistics::FEmpty方法的具体用法?C++ IStatistics::FEmpty怎么用?C++ IStatistics::FEmpty使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IStatistics
的用法示例。
在下文中一共展示了IStatistics::FEmpty方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: CColRefSet
//---------------------------------------------------------------------------
// @function:
// CLogical::PstatsBaseTable
//
// @doc:
// Helper for deriving statistics on a base table
//
//---------------------------------------------------------------------------
IStatistics *
CLogical::PstatsBaseTable
(
IMemoryPool *pmp,
CExpressionHandle &exprhdl,
CTableDescriptor *ptabdesc,
CColRefSet *pcrsStatExtra // additional columns required for stats, not required by parent
)
{
// extract colids and attribute for which detailed stats are necessary
CReqdPropRelational *prprel = CReqdPropRelational::Prprel(exprhdl.Prp());
CColRefSet *pcrsStat = GPOS_NEW(pmp) CColRefSet(pmp);
pcrsStat->Include(prprel->PcrsStat());
if (NULL != pcrsStatExtra)
{
pcrsStat->Include(pcrsStatExtra);
}
DrgPul *pdrgpulHistColIds = GPOS_NEW(pmp) DrgPul(pmp);
DrgPul *pdrgpulHistPos = GPOS_NEW(pmp) DrgPul(pmp);
CUtils::ExtractColIdsAttno(pmp, ptabdesc, pcrsStat, pdrgpulHistColIds, pdrgpulHistPos);
// extract colids and attribute for which widths are necessary
CDrvdPropRelational *pdprel = exprhdl.Pdprel();
CColRefSet *pcrsWidth = pdprel->PcrsOutput();
DrgPul *pdrgpulWidthColIds = GPOS_NEW(pmp) DrgPul(pmp);
DrgPul *pdrgpulWidthPos = GPOS_NEW(pmp) DrgPul(pmp);
CUtils::ExtractColIdsAttno(pmp, ptabdesc, pcrsWidth, pdrgpulWidthColIds, pdrgpulWidthPos);
CMDAccessor *pmda = COptCtxt::PoctxtFromTLS()->Pmda();
IStatistics *pstats = pmda->Pstats(pmp, ptabdesc->Pmdid(), pdrgpulHistPos, pdrgpulHistColIds, pdrgpulWidthPos, pdrgpulWidthColIds);
if (!GPOS_FTRACE(EopttraceDonotCollectMissingStatsCols) && !pstats->FEmpty())
{
CStatisticsUtils::RecordMissingStatisticsColumns(pmp, ptabdesc, pcrsStat, pstats);
}
pcrsStat->Release();
return pstats;
}