throws StandardException
{
FromTable leftFromTable = (FromTable) leftResultSet;
FromTable rightFromTable = (FromTable) rightResultSet;
JBitSet leftReferencedTableMap = leftFromTable.getReferencedTableMap();
JBitSet rightReferencedTableMap = rightFromTable.getReferencedTableMap();
/* Build a list of the join predicates that we can push down */
// Walk outerPredicateList backwards due to possible deletes
for (int index = outerPredicateList.size() - 1; index >= 0; index --)
{
JBitSet curBitSet;
Predicate predicate;
predicate = (Predicate) outerPredicateList.elementAt(index);
if (! predicate.getPushable())
{
continue;
}
curBitSet = predicate.getReferencedSet();
/* Do we have a match? */
JBitSet innerBitSet = (JBitSet) rightReferencedTableMap.clone();
innerBitSet.or(leftReferencedTableMap);
if (innerBitSet.contains(curBitSet))
{
/* Add the matching predicate to the push list */
joinPredicates.addPredicate(predicate);
/* Remap all of the ColumnReferences to point to the