* as the comments above this function say, we scan forward.
*
* Need to save a clone because when we get cached currentRow, "rl" shares the
* same reference, so is changed at the same time.
*/
RowLocation updatedRL = (RowLocation) rl.getClone();
if (past2FutureTbl.size() < maxCapacity)
past2FutureTbl.put(updatedRL, updatedRL);
else
{
tableScan.skipFutureRowHolder = true;
ExecRow rlRow = new ValueRow(1);
for (;;)
{
ExecRow aRow = tableScan.getNextRowCore();
if (aRow == null)
{
tableScan.sourceDrained = true;
tableScan.past2FutureTbl = null; // de-reference for garbage coll.
break;
}
RowLocation rowLoc = (RowLocation) aRow.getColumn(aRow.nColumns());
if (updatedRL.equals(rowLoc)) //this row we are updating jumped forward
{
saveLastCusorKey(tableScan, aRow);
break; // don't need to worry about adding this row to hash any more