本文整理汇总了C++中Join::setJoinFromPTRule方法的典型用法代码示例。如果您正苦于以下问题:C++ Join::setJoinFromPTRule方法的具体用法?C++ Join::setJoinFromPTRule怎么用?C++ Join::setJoinFromPTRule使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Join
的用法示例。
在下文中一共展示了Join::setJoinFromPTRule方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: leftLinearize
// ------------------------------------------------------------------------
// Create a left linear subtree of joins from this MultiJoin
// ------------------------------------------------------------------------
Join* MultiJoin::leftLinearize(NABoolean fixJoinOrder, NABoolean createPriviledgedJoins) const
{
// At this point assert that the subsets has no group by member.
// If we want to allow GBs in this method in the future we should
// remember to use computeJBBSubset() instead of the faster
// jbbcsToJBBSubset() used currently in this method..
CMPASSERT ( (jbbSubset_.getGB() == NULL_CA_ID));
const CANodeIdSet & jbbcs = jbbSubset_.getJBBCs();
// pick some child to make right child of join
CANodeId jbbcRight(jbbcs.getFirst());
CANodeIdSet right(jbbcRight);
CANodeIdSet left(jbbcs);
left -= jbbcRight;
NABoolean nonExpander = (left.jbbcsToJBBSubset()->
isGuaranteedNonExpandingJoin((*jbbcRight.getNodeAnalysis()->getJBBC())));
Join* result = splitSubset(*(left.jbbcsToJBBSubset()),
*(right.jbbcsToJBBSubset()));
if (fixJoinOrder)
{
// disallow left shift rule on the join
result->contextInsensRules() += JoinLeftShiftRuleNumber;
// disallow join commutativity on the join
result->contextInsensRules() += JoinCommutativityRuleNumber;
}
if (createPriviledgedJoins)
{
result->setJoinFromPTRule();
if ( CmpCommon::getDefault(COMP_BOOL_120) == DF_OFF)
{
result->updatePotential(-2);
}
}
// If left subset is a multiJoin, then linearize it too.
if (left.entries() > 1)
{
// left child must be multiJoin at this point. May be add assert.
MultiJoin* leftChild = (MultiJoin*)(result->child(0).getPtr());
result->child(0) = leftChild->leftLinearize(fixJoinOrder,createPriviledgedJoins);
}
return result;
} // MultiJoin::leftLinearize()