本文整理汇总了C++中CExpressionHandle::GetDrvdScalarProps方法的典型用法代码示例。如果您正苦于以下问题:C++ CExpressionHandle::GetDrvdScalarProps方法的具体用法?C++ CExpressionHandle::GetDrvdScalarProps怎么用?C++ CExpressionHandle::GetDrvdScalarProps使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CExpressionHandle
的用法示例。
在下文中一共展示了CExpressionHandle::GetDrvdScalarProps方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
//---------------------------------------------------------------------------
// @function:
// CXformSubqJoin2Apply::Exfp
//
// @doc:
// Compute xform promise for a given expression handle;
// if subqueries exist in the scalar predicate, we must have an
// equivalent logical Apply expression created during exploration;
// no need for generating a Join expression here
//
//---------------------------------------------------------------------------
CXform::EXformPromise
CXformSubqJoin2Apply::Exfp
(
CExpressionHandle &exprhdl
)
const
{
if (exprhdl.GetDrvdScalarProps(exprhdl.Arity() - 1)->FHasSubquery())
{
return CXform::ExfpHigh;
}
return CXform::ExfpNone;
}
示例2:
//---------------------------------------------------------------------------
// @function:
// CPhysical::FUnaryUsesDefinedColumns
//
// @doc:
// Return true if the given column set includes any of the columns defined
// by the unary node, as given by the handle
//
//---------------------------------------------------------------------------
BOOL
CPhysical::FUnaryUsesDefinedColumns
(
CColRefSet *pcrs,
CExpressionHandle &exprhdl
)
{
GPOS_ASSERT(NULL != pcrs);
GPOS_ASSERT(2 == exprhdl.Arity() && "Not a unary operator");
if (0 == pcrs->Size())
{
return false;
}
return !pcrs->IsDisjoint(exprhdl.GetDrvdScalarProps(1)->PcrsDefined());
}
示例3:
//---------------------------------------------------------------------------
// @function:
// CXformGbAggWithMDQA2Join::Exfp
//
// @doc:
// Compute xform promise for a given expression handle;
//
//---------------------------------------------------------------------------
CXform::EXformPromise
CXformGbAggWithMDQA2Join::Exfp
(
CExpressionHandle &exprhdl
)
const
{
CAutoMemoryPool amp;
CLogicalGbAgg *popAgg = CLogicalGbAgg::PopConvert(exprhdl.Pop());
if (COperator::EgbaggtypeGlobal == popAgg->Egbaggtype() &&
exprhdl.GetDrvdScalarProps(1 /*child_index*/)->FHasMultipleDistinctAggs())
{
return CXform::ExfpHigh;
}
return CXform::ExfpNone;
}
示例4:
//---------------------------------------------------------------------------
// @function:
// CXformLeftSemiJoin2InnerJoin::Exfp
//
// @doc:
// Compute xform promise for a given expression handle;
//
//---------------------------------------------------------------------------
CXform::EXformPromise
CXformLeftSemiJoin2InnerJoin::Exfp
(
CExpressionHandle &exprhdl
)
const
{
if (exprhdl.HasOuterRefs() || exprhdl.GetDrvdScalarProps(2)->FHasSubquery())
{
return ExfpNone;
}
CColRefSet *pcrsInnerOutput = exprhdl.GetRelationalProperties(1 /*child_index*/)->PcrsOutput();
CExpression *pexprScalar = exprhdl.PexprScalarChild(2 /*child_index*/);
CAutoMemoryPool amp;
// examine join predicate to determine xform applicability
if (!CPredicateUtils::FSimpleEqualityUsingCols(amp.Pmp(), pexprScalar, pcrsInnerOutput))
{
return ExfpNone;
}
return ExfpHigh;
}