本文整理汇总了C++中Scan::setTableAttributes方法的典型用法代码示例。如果您正苦于以下问题:C++ Scan::setTableAttributes方法的具体用法?C++ Scan::setTableAttributes怎么用?C++ Scan::setTableAttributes使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Scan
的用法示例。
在下文中一共展示了Scan::setTableAttributes方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Scan
// This method forms the join expression with the estLogProps.
Join * AppliedStatMan::formJoinExprWithEstLogProps(
const EstLogPropSharedPtr& leftEstLogProp,
const EstLogPropSharedPtr& rightEstLogProp,
const EstLogPropSharedPtr& inputEstLogProp,
const ValueIdSet * setOfPredicates,
const NABoolean cacheable,
JBBSubset * combinedJBBSubset)
{
// Form a join expression with these estLogProps.
// form the left child. Since the estLogProps of the left and the
// right children exist, these can be treated as Scan expressions
Scan * leftChildExpr = new STMTHEAP Scan();
GroupAttributes * galeft = new STMTHEAP GroupAttributes();
// set GroupAttr of the leftChild
galeft->inputLogPropList().insert(inputEstLogProp);
galeft->outputLogPropList().insert(leftEstLogProp);
CANodeIdSet * leftNodeSet = leftEstLogProp->getNodeSet();
CANodeId nodeId;
if (leftNodeSet)
{
if (leftNodeSet->entries() == 1)
{
nodeId = leftNodeSet->getFirst();
if(nodeId.getNodeAnalysis()->getTableAnalysis())
leftChildExpr->setTableAttributes(nodeId);
}
CostScalar minEstCard = leftNodeSet->getMinChildEstRowCount();
galeft->setMinChildEstRowCount(minEstCard);
}
leftChildExpr->setGroupAttr(galeft);
galeft->setLogExprForSynthesis(leftChildExpr);
// form the right child and set its groupAttr
Scan * rightChildExpr = new STMTHEAP Scan();
GroupAttributes * garight = new STMTHEAP GroupAttributes();
garight->inputLogPropList().insert(inputEstLogProp);
garight->outputLogPropList().insert(rightEstLogProp);
CANodeIdSet * rightNodeSet = rightEstLogProp->getNodeSet();
// xxx
JBBC * singleRightChild = NULL;
Join * singleRightChildParentJoin = NULL;
ValueIdSet leftOuterJoinFilterPreds;
if (rightNodeSet)
{
if (rightNodeSet->entries() == 1)
{
nodeId = rightNodeSet->getFirst();
if(nodeId.getNodeAnalysis()->getTableAnalysis())
rightChildExpr->setTableAttributes(nodeId);
if(nodeId.getNodeAnalysis()->getJBBC())
{
singleRightChild = nodeId.getNodeAnalysis()->getJBBC();
if(singleRightChild)
singleRightChildParentJoin = singleRightChild->getOriginalParentJoin();
}
}
CostScalar minEstCard = rightNodeSet->getMinChildEstRowCount();
garight->setMinChildEstRowCount(minEstCard);
}
rightChildExpr->setGroupAttr(garight);
garight->setLogExprForSynthesis(rightChildExpr);
Join * joinExpr = NULL;
if(singleRightChild &&
singleRightChildParentJoin)
{
if(singleRightChildParentJoin->isSemiJoin())
joinExpr = new STMTHEAP Join(leftChildExpr,
rightChildExpr,
REL_SEMIJOIN,
NULL);
if(singleRightChildParentJoin->isAntiSemiJoin())
joinExpr = new STMTHEAP Join(leftChildExpr,
rightChildExpr,
REL_ANTI_SEMIJOIN,
NULL);
if(singleRightChildParentJoin->isLeftJoin())
{
joinExpr = new STMTHEAP Join(leftChildExpr,
rightChildExpr,
REL_LEFT_JOIN,
NULL);
leftOuterJoinFilterPreds += singleRightChild->getLeftJoinFilterPreds();
}
//.........这里部分代码省略.........