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


C++ CExpressionHandle::FHasOuterRefs方法代码示例

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


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

示例1:

//---------------------------------------------------------------------------
//	@function:
//		CPhysicalComputeScalar::EpetDistribution
//
//	@doc:
//		Return the enforcing type for distribution property based on this operator
//
//---------------------------------------------------------------------------
CEnfdProp::EPropEnforcingType
CPhysicalComputeScalar::EpetDistribution
	(
	CExpressionHandle &exprhdl,
	const CEnfdDistribution *ped
	)
	const
{
	GPOS_ASSERT(NULL != ped);

	// get distribution delivered by the filter node
	CDistributionSpec *pds = CDrvdPropPlan::Pdpplan(exprhdl.Pdp())->Pds();
	if (ped->FCompatible(pds))
	{
		 // required distribution is already provided
		 return CEnfdProp::EpetUnnecessary;
	}

	if (exprhdl.FHasOuterRefs())
	{
		return CEnfdProp::EpetProhibited;
	}

	return CEnfdProp::EpetRequired;
}
开发者ID:HanumathRao,项目名称:gporca,代码行数:33,代码来源:CPhysicalComputeScalar.cpp

示例2:

//---------------------------------------------------------------------------
//	@function:
//		CPhysicalAgg::EpetDistribution
//
//	@doc:
//		Return the enforcing type for distribution property based on this operator
//
//---------------------------------------------------------------------------
CEnfdProp::EPropEnforcingType
CPhysicalAgg::EpetDistribution
	(
	CExpressionHandle &exprhdl,
	const CEnfdDistribution *ped
	)
	const
{
	GPOS_ASSERT(NULL != ped);

	// get distribution delivered by the aggregate node
	CDistributionSpec *pds = CDrvdPropPlan::Pdpplan(exprhdl.Pdp())->Pds();

	if (ped->FCompatible(pds))
	{
		if (COperator::EgbaggtypeLocal != Egbaggtype())
		{
			return CEnfdProp::EpetUnnecessary;
		}

		// prohibit the plan if local aggregate already delivers the enforced distribution, since
		// otherwise we would create two aggregates with no intermediate motion operators
		return CEnfdProp::EpetProhibited;

	}

	// if there are outer refs, we cannot have a motion on top
	if (exprhdl.FHasOuterRefs())
	{
		return CEnfdProp::EpetProhibited;
	}

	// required distribution will be enforced on Agg's output
	return CEnfdProp::EpetRequired;
}
开发者ID:HanumathRao,项目名称:gporca,代码行数:43,代码来源:CPhysicalAgg.cpp

示例3:

//---------------------------------------------------------------------------
//	@function:
//		CXformLeftAntiSemiApply2LeftAntiSemiJoin::Exfp
//
//	@doc:
//		Compute xform promise for a given expression handle;
//		outer references are not allowed
//
//---------------------------------------------------------------------------
CXform::EXformPromise
CXformLeftAntiSemiApply2LeftAntiSemiJoin::Exfp
	(
	CExpressionHandle &exprhdl
	)
	const
{
	// if there are outer refs that include columns from the immediate outer child, the
	// transformation is applicable
	if (exprhdl.FHasOuterRefs(1 /*ulChildIndex*/) && !CUtils::FInnerUsesExternalColsOnly(exprhdl))
	{
		return CXform::ExfpHigh;
	}

	return CXform::ExfpNone;
}
开发者ID:MoZhonghua,项目名称:gporca,代码行数:25,代码来源:CXformLeftAntiSemiApply2LeftAntiSemiJoin.cpp

示例4:

//---------------------------------------------------------------------------
//	@function:
//		CXformLeftAntiSemiApply2LeftAntiSemiJoinNoCorrelations::Exfp
//
//	@doc:
//		Compute xform promise for a given expression handle;
//		outer references are not allowed
//
//---------------------------------------------------------------------------
CXform::EXformPromise
CXformLeftAntiSemiApply2LeftAntiSemiJoinNoCorrelations::Exfp
	(
	CExpressionHandle &exprhdl
	)
	const
{
	// if there are no outer references, or if all outer refs do not reference outer
	// child, the transformation is applicable
	if (!exprhdl.FHasOuterRefs(1 /*ulChildIndex*/) || CUtils::FInnerUsesExternalColsOnly(exprhdl))
	{
		return CXform::ExfpHigh;
	}

	return CXform::ExfpNone;
}
开发者ID:MoZhonghua,项目名称:gporca,代码行数:25,代码来源:CXformLeftAntiSemiApply2LeftAntiSemiJoinNoCorrelations.cpp

示例5:

//---------------------------------------------------------------------------
//	@function:
//		CPhysicalMotion::EpetRewindability
//
//	@doc:
//		Return rewindability property enforcing type for this operator
//
//---------------------------------------------------------------------------
CEnfdProp::EPropEnforcingType
CPhysicalMotion::EpetRewindability
	(
	CExpressionHandle &exprhdl,
	const CEnfdRewindability * // per
	)
	const
{
	if (exprhdl.FHasOuterRefs())
	{
		// motion has outer references: prohibit this plan 
		// Note: this is a GPDB restriction as Motion operators are push-based
		return CEnfdProp::EpetProhibited;
	}

	// motion does not provide rewindability on its output
	return CEnfdProp::EpetRequired;
}
开发者ID:MoZhonghua,项目名称:gporca,代码行数:26,代码来源:CPhysicalMotion.cpp

示例6:

//---------------------------------------------------------------------------
//	@function:
//		CPhysicalTVF::EpetRewindability
//
//	@doc:
//		Return the enforcing type for rewindability property based on this operator
//
//---------------------------------------------------------------------------
CEnfdProp::EPropEnforcingType
CPhysicalTVF::EpetRewindability
	(
	CExpressionHandle &exprhdl,
	const CEnfdRewindability *per
	)
	const
{
	// get rewindability delivered by the TVF node
	CRewindabilitySpec *prs = CDrvdPropPlan::Pdpplan(exprhdl.Pdp())->Prs();
	if (per->FCompatible(prs))
	{
	 	// required distribution is already provided
	 	return CEnfdProp::EpetUnnecessary;
	}

	if (exprhdl.FHasOuterRefs())
	{
		// a TVF should not have a materialize on top of it if it has an outer ref
		return CEnfdProp::EpetProhibited;
	}

	return CEnfdProp::EpetRequired;
}
开发者ID:MoZhonghua,项目名称:gporca,代码行数:32,代码来源:CPhysicalTVF.cpp


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