* @exception StandardException on error
*/
public DataValueDescriptor[] getNextRowFromRowSource()
throws StandardException
{
ExecRow execRow = source.getNextRowCore();
/* Use the single table predicates, if any,
* to filter out rows while populating the
* hash table.
*/
while (execRow != null)
{
boolean restrict = false;
DataValueDescriptor restrictBoolean;
rowsSeen++;
/* If restriction is null, then all rows qualify */
restrictBoolean = (DataValueDescriptor)
((singleTableRestriction == null) ? null : singleTableRestriction.invoke(activation));
// if the result is null, we make it false --
// so the row won't be returned.
restrict = (restrictBoolean == null) ||
((! restrictBoolean.isNull()) &&
restrictBoolean.getBoolean());
if (!restrict)
{
execRow = source.getNextRowCore();
continue;
}
if (targetResultSet != null)
{
/* Let the target preprocess the row. For now, this
* means doing an in place clone on any indexed columns
* to optimize cloning and so that we don't try to drain
* a stream multiple times. This is where we also
* enforce any check constraints.
*/
clonedExecRow = targetResultSet.preprocessSourceRow(execRow);
}
/* Get a single ExecRow of the same size
* on the way in so that we have a row
* to use on the way out.
*/
if (firstIntoHashtable)
{
nextCandidate = activation.getExecutionFactory().getValueRow(execRow.nColumns());
firstIntoHashtable = false;
}
return execRow.getRowArray();
}
return null;
}