|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.derby.impl.sql.execute.BasicNoPutResultSetImpl
org.apache.derby.impl.sql.execute.NoPutResultSetImpl
org.apache.derby.impl.sql.execute.GenericAggregateResultSet
org.apache.derby.impl.sql.execute.ScalarAggregateResultSet
org.apache.derby.impl.sql.execute.DistinctScalarAggregateResultSet
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().
Field Summary | |
private boolean |
dropDistinctAggSort
|
private int |
maxRowSize
|
private ColumnOrdering[] |
order
|
private ScanController |
scanController
|
private boolean |
sorted
|
private long |
sortId
|
private ExecIndexRow |
sortResultRow
|
Fields inherited from class org.apache.derby.impl.sql.execute.ScalarAggregateResultSet |
activation, aggInfoList, aggregates, beginTime, checkGM, checkNullCols, clonedExecRow, closeCleanup, closeTime, cncLen, compactRow, constructorTime, countOfRows, currentRow, endExecutionTime, finished, heapConglomerate, indent, isInSortedOrder, isOpen, isTopResultSet, lcc, nextTime, numOpens, openTime, optimizerEstimatedCost, optimizerEstimatedRowCount, originalSource, resultDescription, resultSetNumber, rowAllocator, rowsFiltered, rowsInput, rowsSeen, singleInputRow, sortTemplateRow, source, sourceDepth, sourceExecIndexRow, startExecutionTime, subIndent, subqueryTrackingArray, targetResultSet |
Fields inherited from interface org.apache.derby.iapi.sql.ResultSet |
CURRENT_RESULTSET_ONLY, ENTIRE_RESULTSET_TREE, ISAFTERLAST, ISBEFOREFIRST, ISFIRST, ISLAST |
Fields inherited from interface org.apache.derby.iapi.sql.execute.NoPutResultSet |
ABSOLUTE, FIRST, LAST, NEXT, PREVIOUS, RELATIVE |
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,
GeneratedMethod c)
Constructor |
Method Summary | |
protected void |
closeSource()
Close the source of whatever we have been scanning. |
ExecRow |
getNextRowCore()
Return the next row. |
ExecIndexRow |
getRowFromResultSet(boolean doClone)
Get a row from the sorter. |
private ScanController |
loadSorter()
Load up the sorter. |
void |
openCore()
Open the scan. |
void |
reopenCore()
reopen a scan on the table. scan parameters are evaluated at each open, so there is probably some way of altering their values... |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.derby.iapi.sql.ResultSet |
checkRowPosition, cleanUp, finish, getAbsoluteRow, getAutoGeneratedKeysResultset, getBeginExecutionTimestamp, getCursorName, getEndExecutionTimestamp, getExecuteTime, getFirstRow, getLastRow, getNextRow, getPreviousRow, getRelativeRow, getResultDescription, getRowNumber, getSubqueryTrackingArray, getWarnings, isClosed, modifiedRowCount, open, returnsRows, setAfterLastRow, setBeforeFirstRow |
Field Detail |
private ColumnOrdering[] order
private int maxRowSize
private boolean dropDistinctAggSort
private long sortId
private ScanController scanController
private ExecIndexRow sortResultRow
private boolean sorted
Constructor Detail |
public DistinctScalarAggregateResultSet(NoPutResultSet s, boolean isInSortedOrder, int aggregateItem, int orderingItem, Activation a, GeneratedMethod ra, int maxRowSize, int resultSetNumber, boolean singleInputRow, double optimizerEstimatedRowCount, double optimizerEstimatedCost, GeneratedMethod c) throws StandardException
s
- input result setisInSortedOrder
- true if the source results are in sorted orderaggregateItem
- indicates the number of the
SavedObject off of the PreparedStatement that holds the
AggregatorInfoList used by this routine.a
- activationra
- generated method to build an empty
output rowresultSetNumber
- The resultSetNumber for this result set
StandardException
- Thrown on errorMethod Detail |
public void openCore() throws StandardException
openCore
in interface NoPutResultSet
openCore
in class ScalarAggregateResultSet
StandardException
- thrown if cursor finished.public ExecRow getNextRowCore() throws StandardException
getNextRowCore
in interface NoPutResultSet
getNextRowCore
in class ScalarAggregateResultSet
StandardException
- thrown on failure.
StandardException
- ResultSetNotOpen thrown if not yet open.public void reopenCore() throws StandardException
reopenCore
in interface NoPutResultSet
reopenCore
in class ScalarAggregateResultSet
StandardException
- thrown if cursor finished.public ExecIndexRow getRowFromResultSet(boolean doClone) throws StandardException
getRowFromResultSet
in class ScalarAggregateResultSet
doClone
- - true of the row should be cloned
StandardException
- Thrown on errorprotected void closeSource() throws StandardException
StandardException
- thrown on errorprivate ScanController loadSorter() throws StandardException
StandardException
- thrown on failure.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |