本文整理汇总了C++中TableIndex::getCounterLET方法的典型用法代码示例。如果您正苦于以下问题:C++ TableIndex::getCounterLET方法的具体用法?C++ TableIndex::getCounterLET怎么用?C++ TableIndex::getCounterLET使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TableIndex
的用法示例。
在下文中一共展示了TableIndex::getCounterLET方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: p_execute
//.........这里部分代码省略.........
//
// POST EXPRESSION
//
assert (m_node->getPredicate() == NULL);
//
// COUNT NULL EXPRESSION
//
AbstractExpression* countNULLExpr = m_node->getSkipNullPredicate();
// For reverse scan edge case NULL values and forward scan underflow case.
if (countNULLExpr != NULL) {
VOLT_DEBUG("COUNT NULL Expression:\n%s", countNULLExpr->debug(true).c_str());
}
bool reverseScanNullEdgeCase = false;
bool reverseScanMovedIndexToScan = false;
if (m_numOfSearchkeys < m_numOfEndkeys &&
(m_endType == INDEX_LOOKUP_TYPE_LT || m_endType == INDEX_LOOKUP_TYPE_LTE)) {
reverseScanNullEdgeCase = true;
VOLT_DEBUG("Index count: reverse scan edge null case." );
}
// An index count has two cases: unique and non-unique
int64_t rkStart = 0, rkEnd = 0, rkRes = 0;
int leftIncluded = 0, rightIncluded = 0;
if (m_numOfSearchkeys != 0) {
// Deal with multi-map
VOLT_DEBUG("INDEX_LOOKUP_TYPE(%d) m_numSearchkeys(%d) key:%s",
localLookupType, activeNumOfSearchKeys, searchKey.debugNoHeader().c_str());
if (searchKeyUnderflow == false) {
if (localLookupType == INDEX_LOOKUP_TYPE_GT) {
rkStart = tableIndex->getCounterLET(&searchKey, true);
} else {
// handle start inclusive cases.
if (tableIndex->hasKey(&searchKey)) {
leftIncluded = 1;
rkStart = tableIndex->getCounterLET(&searchKey, false);
if (reverseScanNullEdgeCase) {
tableIndex->moveToKeyOrGreater(&searchKey);
reverseScanMovedIndexToScan = true;
}
} else {
rkStart = tableIndex->getCounterLET(&searchKey, true);
}
}
} else {
// Do not count null row or columns
tableIndex->moveToKeyOrGreater(&searchKey);
assert(countNULLExpr);
long numNULLs = countNulls(tableIndex, countNULLExpr);
rkStart += numNULLs;
VOLT_DEBUG("Index count[underflow case]: "
"find out %ld null rows or columns are not counted in.", numNULLs);
}
}
if (reverseScanNullEdgeCase) {
// reverse scan case
if (!reverseScanMovedIndexToScan && localLookupType != INDEX_LOOKUP_TYPE_GT) {
tableIndex->moveToEnd(true);
}
assert(countNULLExpr);
long numNULLs = countNulls(tableIndex, countNULLExpr);