本文整理汇总了C++中ValueIdList::clear方法的典型用法代码示例。如果您正苦于以下问题:C++ ValueIdList::clear方法的具体用法?C++ ValueIdList::clear怎么用?C++ ValueIdList::clear使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ValueIdList
的用法示例。
在下文中一共展示了ValueIdList::clear方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: getIndexColumns
void
IndexDesc::getNonKeyColumnList(ValueIdList& nonKeyColumnList) const
{
const ValueIdList
&indexColumns = getIndexColumns(),
&keyColumns = getIndexKey();
// clean up input:
nonKeyColumnList.clear();
// Add all index columns
CollIndex i = 0;
for (i=0;
i < indexColumns.entries();
i++)
{
nonKeyColumnList.insert(indexColumns[i]);
}
// And remove all key columns:
for (i=0;
i < keyColumns.entries();
i++)
{
nonKeyColumnList.remove(keyColumns[i]);
// if this is a secondary index, the base column
// which is part of the index,
// may also be present, remove it:
const ItemExpr *colPtr = keyColumns[i].getItemExpr();
if (colPtr->getOperatorType()
==
ITM_INDEXCOLUMN)
{
const ValueId & colDef = ((IndexColumn *)(colPtr))->getDefinition();
nonKeyColumnList.remove(colDef);
}
}
} // IndexDesc::getNonKeyColumnList(ValueIdSet& nonKeyColumnSet) const
示例2: child
//.........这里部分代码省略.........
workCriDesc->setTupleDescriptor(unPackColsAtpIndex,
#pragma warn(1506) // warning elimination
unPackColsTupleDesc);
#pragma nowarn(1506) // warning elimination
returnedCriDesc->setTupleDescriptor(unPackColsAtpIndex,
#pragma warn(1506) // warning elimination
unPackColsTupleDesc);
// expressions for rowwise rowset implementation.
ex_expr * rwrsInputSizeExpr = 0;
ex_expr * rwrsMaxInputRowlenExpr = 0;
ex_expr * rwrsBufferAddrExpr = 0;
ULng32 rwrsInputSizeExprLen = 0;
ULng32 rwrsMaxInputRowlenExprLen = 0;
ULng32 rwrsBufferAddrExprLen = 0;
const Int32 rwrsAtp = 1;
const Int32 rwrsAtpIndex = workCriDesc->noTuples() - 2;
ExpTupleDesc * rwrsTupleDesc = 0;
ValueIdList rwrsVidList;
if (rowwiseRowset())
{
rwrsVidList.insert(this->rwrsInputSizeExpr()->getValueId());
expGen->generateContiguousMoveExpr(rwrsVidList,
0 /*don't add conv nodes*/,
rwrsAtp, rwrsAtpIndex,
ExpTupleDesc::SQLARK_EXPLODED_FORMAT,
rwrsInputSizeExprLen,
&rwrsInputSizeExpr,
&rwrsTupleDesc,ExpTupleDesc::SHORT_FORMAT);
rwrsVidList.clear();
rwrsVidList.insert(this->rwrsMaxInputRowlenExpr()->getValueId());
expGen->generateContiguousMoveExpr(rwrsVidList,
0 /*don't add conv nodes*/,
rwrsAtp, rwrsAtpIndex,
ExpTupleDesc::SQLARK_EXPLODED_FORMAT,
rwrsMaxInputRowlenExprLen,
&rwrsMaxInputRowlenExpr,
&rwrsTupleDesc,ExpTupleDesc::SHORT_FORMAT);
rwrsVidList.clear();
rwrsVidList.insert(this->rwrsBufferAddrExpr()->getValueId());
expGen->generateContiguousMoveExpr(rwrsVidList,
0 /*don't add conv nodes*/,
rwrsAtp, rwrsAtpIndex,
ExpTupleDesc::SQLARK_EXPLODED_FORMAT,
rwrsBufferAddrExprLen,
&rwrsBufferAddrExpr,
&rwrsTupleDesc,ExpTupleDesc::SHORT_FORMAT);
expGen->assignAtpAndAtpIndex(rwrsOutputVids(),
unPackColsAtp, unPackColsAtpIndex);
}
// Move the generated maptable entries, to the localMapTable,
// so that all other entries can later be removed.
//
for(ValueId outputValId = getGroupAttr()->getCharacteristicOutputs().init();
getGroupAttr()->getCharacteristicOutputs().next(outputValId);
getGroupAttr()->getCharacteristicOutputs().advance(outputValId)) {
generator->addMapInfoToThis(localMapTable, outputValId,
generator->getMapInfo(outputValId)->
示例3: generatePivLayout
void RangePartitioningFunction::generatePivLayout(
Generator *generator,
Lng32 &partitionInputDataLength,
Lng32 atp,
Lng32 atpIndex,
Attributes ***pivAttrs)
{
// Make a layout of the partition input data record such that
// begin and end key are aligned in the same way.
// (layout = ((beg. key) (filler1) (end key) (filler2) (exclusion flag)))
ExpGenerator *expGen = generator->getExpGenerator();
CollIndex numPartInputs = getPartitionInputValuesLayout().entries();
CollIndex numPartKeyCols = (numPartInputs - 1) / 2;
// the number of partition input variables must be odd
GenAssert(2*numPartKeyCols+1 == numPartInputs,
"NOT 2*numPartKeyCols+1 == numPartInputs");
// ---------------------------------------------------------------------
// Start by processing the begin key PIVs
// ---------------------------------------------------------------------
ValueIdList partialPivs;
Attributes **returnedAttrs = NULL;
Attributes **localPartialAttrs;
Lng32 maxAlignment = 1;
Lng32 alignedPartKeyLen;
if (pivAttrs)
{
returnedAttrs = new(generator->wHeap()) Attributes *[numPartInputs];
}
CollIndex i = 0;
for (i = 0; i < numPartKeyCols; i++)
partialPivs.insert(getPartitionInputValuesLayout()[i]);
expGen->processValIdList(
partialPivs,
ExpTupleDesc::SQLARK_EXPLODED_FORMAT,
(ULng32 &) partitionInputDataLength,
atp,
atpIndex,
NULL,
ExpTupleDesc::SHORT_FORMAT,
0,
&localPartialAttrs);
if (returnedAttrs)
for (i = 0; i < numPartKeyCols; i++)
returnedAttrs[i] = localPartialAttrs[i];
// ---------------------------------------------------------------------
// Now find out the max. alignment that is needed in the begin key,
// make sure that the end key starts on an offset that is a
// multiple of the max. alignment in the partition input values
// ---------------------------------------------------------------------
for (i = 0; i < numPartKeyCols; i++)
{
if (localPartialAttrs[i]->getDataAlignmentSize() > maxAlignment)
maxAlignment = localPartialAttrs[i]->getDataAlignmentSize();
if (localPartialAttrs[i]->getVCIndicatorLength() > maxAlignment)
maxAlignment = localPartialAttrs[i]->getVCIndicatorLength();
if (localPartialAttrs[i]->getNullIndicatorLength() > maxAlignment)
maxAlignment = localPartialAttrs[i]->getNullIndicatorLength();
}
alignedPartKeyLen = partitionInputDataLength;
while (alignedPartKeyLen % maxAlignment != 0)
alignedPartKeyLen++;
// ---------------------------------------------------------------------
// Now that we are starting on a good offset, process the end key
// ---------------------------------------------------------------------
partialPivs.clear();
for (i = numPartKeyCols; i < numPartInputs-1; i++)
partialPivs.insert(getPartitionInputValuesLayout()[i]);
expGen->processValIdList(
partialPivs,
ExpTupleDesc::SQLARK_EXPLODED_FORMAT,
(ULng32 &) partitionInputDataLength,
atp,
atpIndex,
NULL,
ExpTupleDesc::SHORT_FORMAT,
alignedPartKeyLen,
&localPartialAttrs);
if (returnedAttrs)
for (i = numPartKeyCols; i < numPartInputs-1; i++)
returnedAttrs[i] = localPartialAttrs[i-numPartKeyCols];
// ---------------------------------------------------------------------
// Process the exclusion flag at offset 2*alignedPartKeyLen
// ---------------------------------------------------------------------
partialPivs.clear();
partialPivs.insert(getPartitionInputValuesLayout()[numPartInputs-1]);
expGen->processValIdList(
//.........这里部分代码省略.........