This ResultSet evaluates scalar aggregates where
1 (or more, in the future) of the aggregates are distinct.
It will scan the entire source result set and calculate
the scalar aggregates when scanning the source during the
first call to next().
author: jerry (broken out from SortResultSet)
Constructor Summary
DistinctScalarAggregateResultSet(NoPutResultSet s, boolean isInSortedOrder, int aggregateItem, int orderingItem, Activation a, GeneratedMethod ra, int maxRowSize, int resultSetNumber, boolean singleInputRow, double optimizerEstimatedRowCount, double optimizerEstimatedCost) Constructor
Parameters: s - input result set Parameters: isInSortedOrder - true if the source results are in sorted order Parameters: aggregateItem - indicates the number of theSavedObject off of the PreparedStatement that holds theAggregatorInfoList used by this routine.
Method Summary
public void
close() If the result set has been opened,
close the open scan.
protected void
closeSource() Close the source of whatever we have been scanning.
DistinctScalarAggregateResultSet(NoPutResultSet s, boolean isInSortedOrder, int aggregateItem, int orderingItem, Activation a, GeneratedMethod ra, int maxRowSize, int resultSetNumber, boolean singleInputRow, double optimizerEstimatedRowCount, double optimizerEstimatedCost) throws StandardException(Code)
Constructor
Parameters: s - input result set Parameters: isInSortedOrder - true if the source results are in sorted order Parameters: aggregateItem - indicates the number of theSavedObject off of the PreparedStatement that holds theAggregatorInfoList used by this routine. Parameters: a - activation Parameters: ra - generated method to build an emptyoutput row Parameters: resultSetNumber - The resultSetNumber for this result set exception: StandardException - Thrown on error
Return the next row. If it is a scalar aggregate scan
exception: StandardException - thrown on failure. exception: StandardException - ResultSetNotOpen thrown if not yet open. the next row in the result
reopen a scan on the table. scan parameters are evaluated
at each open, so there is probably some way of altering
their values...
exception: StandardException - thrown if cursor finished.
Fields inherited from org.apache.derby.impl.sql.execute.ScalarAggregateResultSet