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


C++ CGroup::FScalar方法代码示例

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


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

示例1: UlArity

//---------------------------------------------------------------------------
//	@function:
//		CExpressionHandle::CopyCostCtxtProps
//
//	@doc:
//		Cache plan properties of cost context and its children on the handle
//
//---------------------------------------------------------------------------
void
CExpressionHandle::CopyCostCtxtProps()
{
	GPOS_ASSERT(NULL != m_pcc);
	GPOS_ASSERT(NULL == m_pdrgpdp);
	GPOS_ASSERT(NULL == m_pdp);

	// add-ref context properties
	CDrvdProp *pdp = m_pcc->Pdpplan();
	pdp->AddRef();
	m_pdp = pdp;

	// add-ref child group expressions' properties
	const ULONG ulArity = UlArity();
	m_pdrgpdp = GPOS_NEW(m_pmp) DrgPdp(m_pmp, ulArity);
	for (ULONG ul = 0; ul < ulArity; ul++)
	{
		CGroup *pgroupChild = (*m_pgexpr)[ul];
		if (!pgroupChild->FScalar())
		{
			COptimizationContext *pocChild = (*m_pcc->Pdrgpoc())[ul];
			GPOS_ASSERT(NULL != pocChild);

			CCostContext *pccChild = pocChild->PccBest();
			GPOS_ASSERT(NULL != pccChild);

			pdp = pccChild->Pdpplan();
			pdp->AddRef();
			m_pdrgpdp->Append(pdp);
		}
	}
}
开发者ID:HanumathRao,项目名称:gporca,代码行数:40,代码来源:CExpressionHandle.cpp

示例2:

//---------------------------------------------------------------------------
//	@function:
//		CLogicalInnerJoin::FFewerConj
//
//	@doc:
//		Compare two innerJoin group expressions, test whether the first one
//		has less join predicates than the second one. This is used to
//		prioritize innerJoin with less predicates for stats derivation
//
//---------------------------------------------------------------------------
BOOL
CLogicalInnerJoin::FFewerConj
	(
	IMemoryPool *pmp,
	CGroupExpression *pgexprFst,
	CGroupExpression *pgexprSnd
	)
{
	if (NULL == pgexprFst || NULL == pgexprSnd)
	{
		return false;
	}

	if (COperator::EopLogicalInnerJoin != pgexprFst->Pop()->Eopid() ||
		COperator::EopLogicalInnerJoin != pgexprSnd->Pop()->Eopid())
	{
		return false;
	}

	// third child must be the group for join conditions
	CGroup *pgroupScalarFst = (*pgexprFst)[2];
	CGroup *pgroupScalarSnd = (*pgexprSnd)[2];
	GPOS_ASSERT(pgroupScalarFst->FScalar());
	GPOS_ASSERT(pgroupScalarSnd->FScalar());

	DrgPexpr *pdrgpexprConjFst = CPredicateUtils::PdrgpexprConjuncts(pmp, pgroupScalarFst->PexprScalar());
	DrgPexpr *pdrgpexprConjSnd = CPredicateUtils::PdrgpexprConjuncts(pmp, pgroupScalarSnd->PexprScalar());

	ULONG ulConjFst = pdrgpexprConjFst->UlLength();
	ULONG ulConjSnd = pdrgpexprConjSnd->UlLength();

	pdrgpexprConjFst->Release();
	pdrgpexprConjSnd->Release();

	return ulConjFst < ulConjSnd;
}
开发者ID:MoZhonghua,项目名称:gporca,代码行数:46,代码来源:CLogicalInnerJoin.cpp


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