本文整理汇总了C++中Join::setJoinFromMJSynthLogProp方法的典型用法代码示例。如果您正苦于以下问题:C++ Join::setJoinFromMJSynthLogProp方法的具体用法?C++ Join::setJoinFromMJSynthLogProp怎么用?C++ Join::setJoinFromMJSynthLogProp使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Join
的用法示例。
在下文中一共展示了Join::setJoinFromMJSynthLogProp方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: synthLogPropWithMJReuse
void MultiJoin::synthLogPropWithMJReuse(NormWA * normWAPtr)
{
// Check to see whether this GA has already been associated
// with a logExpr for synthesis. If so, no need to resynthesize
// for this equivalent log. expression.
if (getGroupAttr()->existsLogExprForSynthesis())
{
Join * joinExprForSynth =
(Join *) getGroupAttr()->getLogExprForSynthesis();
if(joinExprForSynth->isJoinFromMJSynthLogProp())
return;
}
NABoolean reUseMJ = TRUE;
CMPASSERT ( (jbbSubset_.getGB() == NULL_CA_ID));
const CANodeIdSet & jbbcs = jbbSubset_.getJBBCs();
// Instead of always picking the first JBBC as the right child
// pick the one with minimum JBBC connections. This will avoid
// all unnecessary crossproducts
CANodeId jbbcRight;
jbbcRight = jbbcs.getJBBCwithMinConnectionsToThisJBBSubset();
CANodeIdSet right(jbbcRight);
CANodeIdSet left(jbbcs);
left -= jbbcRight;
Join* join = splitSubset(*(left.jbbcsToJBBSubset()),
*(right.jbbcsToJBBSubset()),
reUseMJ);
//if the left is a MultiJoin, synthesize it using reUse
//this has to be done before join->synthLogProp to avoid
//calling MultiJoin::synthLogProp on the left MultiJoin
//because that does not reUse
if(left.entries() > 1)
{
RelExpr * leftRelExpr = join->child(0)->castToRelExpr();
if(leftRelExpr &&
leftRelExpr->getOperator() == REL_MULTI_JOIN)
((MultiJoin *) leftRelExpr)->synthLogPropWithMJReuse(normWAPtr);
}
join->synthLogProp(normWAPtr);
join->setJoinFromMJSynthLogProp();
getGroupAttr()->setLogExprForSynthesis(join);
jbbSubset_.setSubsetMJ(this);
CMPASSERT ( getGroupAttr()->getNumJoinedTables() >= getArity());
}
示例2: synthLogProp
void MultiJoin::synthLogProp(NormWA * normWAPtr)
{
// Check to see whether this GA has already been associated
// with a logExpr for synthesis. If so, no need to resynthesize
// for this equivalent log. expression.
if (getGroupAttr()->existsLogExprForSynthesis()) return;
CMPASSERT ( (jbbSubset_.getGB() == NULL_CA_ID));
const CANodeIdSet & jbbcs = jbbSubset_.getJBBCs();
// Instead of always picking the first JBBC as the right child
// pick the one with minimum JBBC connections. This will avoid
// all unnecessary crossproducts
CANodeId jbbcRight;
jbbcRight = jbbcs.getJBBCwithMinConnectionsToThisJBBSubset();
CANodeIdSet right(jbbcRight);
CANodeIdSet left(jbbcs);
left -= jbbcRight;
Join* join = splitSubset(*(left.jbbcsToJBBSubset()),
*(right.jbbcsToJBBSubset()));
join->synthLogProp(normWAPtr);
getGroupAttr()->setLogExprForSynthesis(join);
join->setJoinFromMJSynthLogProp();
jbbSubset_.setSubsetMJ(this);
CASortedList * synthLogPropPath =
new (CmpCommon::statementHeap())
CASortedList(CmpCommon::statementHeap(), jbbcs.entries());
synthLogPropPath->insert((*(left.jbbcsToJBBSubset()->getSynthLogPropPath())));
synthLogPropPath->insert(right.getFirst());
jbbSubset_.setSynthLogPropPath(synthLogPropPath);
CMPASSERT ( getGroupAttr()->getNumJoinedTables() >= getArity());
}