ValueIdSet TableDesc::getLocalPreds() { ValueIdSet localPreds; localPreds.clear(); // We can get this information from TableAnalysis const TableAnalysis * tableAnalysis = getTableAnalysis(); // if no tableAnalysis exists, return FALSE if(tableAnalysis) localPreds = tableAnalysis->getLocalPreds(); return localPreds; }
void IndexDesc::getNonKeyColumnSet(ValueIdSet& nonKeyColumnSet) const { const ValueIdList &indexColumns = getIndexColumns(), &keyColumns = getIndexKey(); // clean up input: nonKeyColumnSet.clear(); // Add all index columns CollIndex i = 0; for (i=0; i < indexColumns.entries(); i++) { nonKeyColumnSet.insert(indexColumns[i]); } // And remove all key columns: for (i=0; i < keyColumns.entries(); i++) { nonKeyColumnSet.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(); nonKeyColumnSet.remove(colDef); } } } // IndexDesc::getNonKeyColumnSet(ValueIdSet& nonKeyColumnSet) const
void MultiJoin::getPotentialOutputValues(ValueIdSet & outputValues) const { outputValues.clear(); CANodeIdSet jbbcs = jbbSubset_.getJBBCs(); Int32 arity = getArity(); for (Lng32 i = 0; i < arity; i++) { JBBC * jbbci = child(i)->getGroupAnalysis()->getNodeAnalysis()->getJBBC(); if(jbbci->parentIsLeftJoin()) outputValues.insertList(jbbci->nullInstantiatedOutput()); else // Default implementation is good enough for innerNonSemi multi join outputValues += child(i).getGroupAttr()->getCharacteristicOutputs(); } } // MultiJoin::getPotentialOutputValues()