当前位置: 首页>>代码示例>>C++>>正文


C++ CDrvdPropPlan::AddRef方法代码示例

本文整理汇总了C++中CDrvdPropPlan::AddRef方法的典型用法代码示例。如果您正苦于以下问题:C++ CDrvdPropPlan::AddRef方法的具体用法?C++ CDrvdPropPlan::AddRef怎么用?C++ CDrvdPropPlan::AddRef使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CDrvdPropPlan的用法示例。


在下文中一共展示了CDrvdPropPlan::AddRef方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: hmcri

//---------------------------------------------------------------------------
//	@function:
//		CCTEReq::PcterUnresolved
//
//	@doc:
//		Unresolved CTE requirements given a derived CTE map
//
//---------------------------------------------------------------------------
CCTEReq *
CCTEReq::PcterUnresolved
	(
	IMemoryPool *pmp,
	CCTEMap *pcm
	)
{
	GPOS_ASSERT(NULL != pcm);
	CCTEReq *pcterUnresolved = GPOS_NEW(pmp) CCTEReq(pmp);

	HMCteReqIter hmcri(m_phmcter);
	while (hmcri.FAdvance())
	{
		// if a cte is marked as required and it is not found in the given map
		// then keep it as required, else make it optional
		const CCTEReqEntry *pcre = hmcri.Pt();
		ULONG ulId = pcre->UlId();
		BOOL fRequired = pcre->FRequired() && CCTEMap::EctSentinel == pcm->Ect(ulId);
		CDrvdPropPlan *pdpplan = pcre->PdpplanProducer();
		if (NULL != pdpplan)
		{
			pdpplan->AddRef();
		}

		pcterUnresolved->Insert(ulId, pcre->Ect(), fRequired, pdpplan);
	}

	return pcterUnresolved;
}
开发者ID:HanumathRao,项目名称:gporca,代码行数:37,代码来源:CCTEReq.cpp

示例2: hmulpdpiter

//---------------------------------------------------------------------------
//	@function:
//		CDrvdPropCtxtPlan::PdpctxtCopy
//
//	@doc:
//		Copy function
//
//---------------------------------------------------------------------------
CDrvdPropCtxt *
CDrvdPropCtxtPlan::PdpctxtCopy
(
    IMemoryPool *pmp
)
const
{
    CDrvdPropCtxtPlan *pdpctxtplan = GPOS_NEW(pmp) CDrvdPropCtxtPlan(pmp);
    pdpctxtplan->m_ulExpectedPartitionSelectors = m_ulExpectedPartitionSelectors;

    HMUlPdpIter hmulpdpiter(m_phmulpdpCTEs);
    while (hmulpdpiter.FAdvance())
    {
        ULONG ulId = *(hmulpdpiter.Pk());
        CDrvdPropPlan *pdpplan = const_cast<CDrvdPropPlan *>(hmulpdpiter.Pt());
        pdpplan->AddRef();
#ifdef GPOS_DEBUG
        BOOL fInserted =
#endif // GPOS_DEBUG
            pdpctxtplan->m_phmulpdpCTEs->FInsert(GPOS_NEW(m_pmp) ULONG(ulId), pdpplan);
        GPOS_ASSERT(fInserted);
    }

    return pdpctxtplan;
}
开发者ID:hsyuan,项目名称:gporca,代码行数:33,代码来源:CDrvdPropCtxtPlan.cpp

示例3: ULONG

//---------------------------------------------------------------------------
//	@function:
//		CDrvdPropCtxtPlan::AddProps
//
//	@doc:
//		Add props to context
//
//---------------------------------------------------------------------------
void
CDrvdPropCtxtPlan::AddProps
(
    CDrvdProp *pdp
)
{
    if (CDrvdProp::EptPlan != pdp->Ept())
    {
        // passed property is not a plan property container
        return;
    }

    CDrvdPropPlan *pdpplan = CDrvdPropPlan::Pdpplan(pdp);

    ULONG ulProducerId = ULONG_MAX;
    CDrvdPropPlan *pdpplanProducer = pdpplan->Pcm()->PdpplanProducer(&ulProducerId);
    if (NULL == pdpplanProducer)
    {
        return;
    }

    if (m_fUpdateCTEMap)
    {
        pdpplanProducer->AddRef();
#ifdef GPOS_DEBUG
        BOOL fInserted =
#endif // GPOS_DEBUG
            m_phmulpdpCTEs->FInsert(GPOS_NEW(m_pmp) ULONG(ulProducerId), pdpplanProducer);
        GPOS_ASSERT(fInserted);
    }
}
开发者ID:hsyuan,项目名称:gporca,代码行数:39,代码来源:CDrvdPropCtxtPlan.cpp

示例4: DrgPdp

//---------------------------------------------------------------------------
//	@function:
//		CExpressionHandle::DerivePlanProps
//
//	@doc:
//		Derive the properties of the plan carried by attached cost context
//
//---------------------------------------------------------------------------
void
CExpressionHandle::DerivePlanProps
	(
	CDrvdPropCtxtPlan *pdpctxtplan
	)
{
	GPOS_ASSERT(NULL != m_pcc);
	GPOS_ASSERT(NULL != m_pgexpr);
	GPOS_ASSERT(NULL == m_pdrgpdp);
	GPOS_ASSERT(NULL == m_pdp);
	GPOS_CHECK_ABORT;

	// check if properties have been already derived
	if (NULL != m_pcc->Pdpplan())
	{
		CopyCostCtxtProps();
		return;
	}
	GPOS_ASSERT(NULL != pdpctxtplan);

	// extract children's properties
	m_pdrgpdp = GPOS_NEW(m_pmp) DrgPdp(m_pmp);
	const ULONG ulArity = m_pcc->Pdrgpoc()->UlLength();
	for (ULONG ul = 0; ul < ulArity; ul++)
	{
		COptimizationContext *pocChild = (*m_pcc->Pdrgpoc())[ul];
		CDrvdPropPlan *pdpplan = pocChild->PccBest()->Pdpplan();
		GPOS_ASSERT(NULL != pdpplan);

		pdpplan->AddRef();
		m_pdrgpdp->Append(pdpplan);

		// add child props to derivation context
		CDrvdPropCtxt::AddDerivedProps(pdpplan, pdpctxtplan);
	}

	COperator *pop = m_pgexpr->Pop();
	if (COperator::EopPhysicalCTEConsumer == pop->Eopid())
	{
		// copy producer plan properties to passed derived plan properties context
		ULONG ulCTEId = CPhysicalCTEConsumer::PopConvert(pop)->UlCTEId();
		CDrvdPropPlan *pdpplan = m_pcc->Poc()->Prpp()->Pcter()->Pdpplan(ulCTEId);
		if (NULL != pdpplan)
		{
			pdpctxtplan->CopyCTEProducerProps(pdpplan, ulCTEId);
		}
	}

	// set the number of expected partition selectors in the context
	pdpctxtplan->SetExpectedPartitionSelectors(pop, m_pcc);

	// create/derive local properties
	m_pdp = Pop()->PdpCreate(m_pmp);
	m_pdp->Derive(m_pmp, *this, pdpctxtplan);
}
开发者ID:HanumathRao,项目名称:gporca,代码行数:63,代码来源:CExpressionHandle.cpp

示例5:

//---------------------------------------------------------------------------
//	@function:
//		CCTEReq::InsertConsumer
//
//	@doc:
//		Insert a new consumer entry. with the given id. The plan properties are
//		taken from the given context
//
//---------------------------------------------------------------------------
void
CCTEReq::InsertConsumer
	(
	ULONG ulId,
	DrgPdp *pdrgpdpCtxt
	)
{
	ULONG ulProducerId = ULONG_MAX;
	CDrvdPropPlan *pdpplan = CDrvdPropPlan::Pdpplan((*pdrgpdpCtxt)[0])->Pcm()->PdpplanProducer(&ulProducerId);
	GPOS_ASSERT(NULL != pdpplan);
	GPOS_ASSERT(ulProducerId == ulId && "unexpected CTE producer plan properties");

	pdpplan->AddRef();
	Insert(ulId, CCTEMap::EctConsumer, true /*fRequired*/, pdpplan);
}
开发者ID:HanumathRao,项目名称:gporca,代码行数:24,代码来源:CCTEReq.cpp

示例6: exprhdl

//---------------------------------------------------------------------------
//	@function:
//		CCostContext::DerivePlanProps
//
//	@doc:
//		Derive properties of the plan carried by cost context
//
//---------------------------------------------------------------------------
void
CCostContext::DerivePlanProps
	(
	IMemoryPool *pmp
	)
{
	GPOS_ASSERT(NULL != m_pdrgpoc);

	if (NULL == m_pdpplan)
	{
		// derive properties of the plan carried by cost context
		CExpressionHandle exprhdl(pmp);
		exprhdl.Attach(this);
		exprhdl.DerivePlanProps();
		CDrvdPropPlan *pdpplan = CDrvdPropPlan::Pdpplan(exprhdl.Pdp());
		GPOS_ASSERT(NULL != pdpplan);

		// set derived plan properties
		pdpplan->AddRef();
		m_pdpplan = pdpplan;
		GPOS_ASSERT(NULL != m_pdpplan);
	}
}
开发者ID:d,项目名称:gporca,代码行数:31,代码来源:CCostContext.cpp


注:本文中的CDrvdPropPlan::AddRef方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。