class GroupedAggregateResultSet extends GenericAggregateResultSet implements CursorResultSet
| Modifier and Type | Field and Description |
|---|---|
private java.util.HashSet[][] |
distinctValues |
private java.util.List |
finishedResults |
private long |
genericSortId |
boolean |
hasDistinctAggregate |
boolean |
isInSortedOrder |
private int |
maxRowSize |
private int |
numDistinctAggs |
private ColumnOrdering[] |
order |
private ExecIndexRow[] |
resultRows |
private boolean |
resultsComplete |
private boolean |
rollup |
int |
rowsInput |
int |
rowsReturned |
private ScanController |
scanController |
java.util.Properties |
sortProperties |
private ExecIndexRow |
sortResultRow |
private ExecIndexRow |
sourceExecIndexRow |
private TransactionController |
tc |
private boolean |
usingAggregateObserver |
aggInfoList, aggregates, originalSource, sourcecheckNullCols, clonedExecRow, cncLen, resultSetNumber, targetResultSetactivation, beginTime, closeTime, compactRow, constructorTime, currentRow, endExecutionTime, finished, isOpen, isTopResultSet, nextTime, numOpens, openTime, optimizerEstimatedCost, optimizerEstimatedRowCount, resultDescription, rowsFiltered, rowsSeen, startExecutionTime, subqueryTrackingArrayCURRENT_RESULTSET_ONLY, ENTIRE_RESULTSET_TREE, ISAFTERLAST, ISBEFOREFIRST, ISFIRST, ISLAST| Constructor and Description |
|---|
GroupedAggregateResultSet(NoPutResultSet s,
boolean isInSortedOrder,
int aggregateItem,
int orderingItem,
Activation a,
int ra,
int maxRowSize,
int resultSetNumber,
double optimizerEstimatedRowCount,
double optimizerEstimatedCost,
boolean isRollup)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
If the result set has been opened,
close the open scan.
|
void |
closeSource()
Close the source of whatever we have been scanning.
|
private void |
dumpAllRows(int cR) |
private java.lang.String |
dumpRow(ExecRow r) |
private ExecRow |
finalizeResults() |
ExecRow |
getCurrentRow()
This result set has its row from the last fetch done.
|
ExecRow |
getNextRowCore()
Return the next row.
|
private ExecIndexRow |
getNextRowFromRS()
Get the next output row for processing
|
private ExecIndexRow |
getRowFromResultSet()
Get a row from the input result set.
|
private ExecIndexRow |
getRowFromSorter()
Get a row from the sorter.
|
RowLocation |
getRowLocation()
This result set has its row location from
the last fetch done.
|
long |
getTimeSpent(int type)
Return the total amount of time spent in this ResultSet
|
private void |
initializeDistinctMaps(int r,
boolean allocate) |
private void |
initializeVectorAggregation(ExecRow row)
Run the aggregator initialization method for
each aggregator in the row.
|
private ScanController |
loadSorter()
Load up the sorter.
|
private ExecRow |
makeCurrent(java.lang.Object row) |
private void |
mergeVectorAggregates(ExecRow newRow,
ExecRow currRow,
int level)
Run the aggregator merge method for
each aggregator in the row.
|
private int |
numGCols()
Return the number of grouping columns.
|
void |
openCore()
Open the scan.
|
private int |
sameGroupingValues(ExecRow currRow,
ExecRow newRow)
Return whether or not the new row has the same values for the
grouping columns as the current row.
|
private void |
setRollupColumnsToNull(ExecRow row,
int resultNum) |
finish, finishAggregation, getRowTemplate, getSortAggregatorsclearCurrentRow, clearOrderableCache, closeRowSource, getCursorName, getNextRowFromRowSource, getResultDescription, getValidColumns, isForUpdate, markRowAsDeleted, needsRowLocation, needsToClone, positionScanAtRowLocation, printQualifiers, resultSetNumber, rowLocation, setCurrentRow, setNeedsRowLocation, setTargetResultSet, skipRow, skipScan, updateRowaddWarning, attachStatementContext, checkCancellationFlag, checkRowPosition, cleanUp, dumpTimeStats, finishAndRTS, getAbsoluteRow, getActivation, getAutoGeneratedKeysResultset, getBeginExecutionTimestamp, getCompactRow, getCurrentTimeMillis, getElapsedMillis, getEndExecutionTimestamp, getEstimatedRowCount, getExecuteTime, getExecutionFactory, getFirstRow, getLanguageConnectionContext, getLastRow, getNextRow, getPointOfAttachment, getPreviousRow, getRelativeRow, getRowNumber, getScanIsolationLevel, getSubqueryTrackingArray, getTransactionController, getWarnings, isClosed, isXplainOnlyMode, markAsTopResultSet, modifiedRowCount, open, recordConstructorTime, reopenCore, requiresRelocking, returnsRows, setAfterLastRow, setBeforeFirstRow, setCompactRow, setCompatRowclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddWarning, checkRowPosition, cleanUp, clearCurrentRow, finish, getAbsoluteRow, getActivation, getAutoGeneratedKeysResultset, getBeginExecutionTimestamp, getCursorName, getEndExecutionTimestamp, getExecuteTime, getFirstRow, getLastRow, getNextRow, getPreviousRow, getRelativeRow, getResultDescription, getRowNumber, getSubqueryTrackingArray, getWarnings, isClosed, modifiedRowCount, open, returnsRows, setAfterLastRow, setBeforeFirstRowpublic int rowsInput
public int rowsReturned
private ColumnOrdering[] order
public boolean hasDistinctAggregate
public boolean isInSortedOrder
private int numDistinctAggs
private int maxRowSize
private ScanController scanController
private ExecIndexRow sourceExecIndexRow
private ExecIndexRow sortResultRow
private boolean resultsComplete
private java.util.List finishedResults
private ExecIndexRow[] resultRows
private java.util.HashSet[][] distinctValues
private boolean rollup
private boolean usingAggregateObserver
private long genericSortId
private TransactionController tc
public java.util.Properties sortProperties
GroupedAggregateResultSet(NoPutResultSet s, boolean isInSortedOrder, int aggregateItem, int orderingItem, Activation a, int ra, int maxRowSize, int resultSetNumber, double optimizerEstimatedRowCount, double optimizerEstimatedCost, boolean isRollup) 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.orderingItem - indicates the number of the
SavedObject off of the PreparedStatement that holds the
ColumOrdering array used by this routinea - activationra - saved object that builds an empty output rowmaxRowSize - approx row size, passed to sorterresultSetNumber - The resultSetNumber for this result setStandardException - Thrown on errorpublic void openCore()
throws StandardException
openCore in interface NoPutResultSetStandardException - thrown if cursor finished.private ScanController loadSorter() throws StandardException
StandardException - thrown on failure.private int numGCols()
public ExecRow getNextRowCore() throws StandardException
getNextRowCore in interface NoPutResultSetgetNextRowCore in class BasicNoPutResultSetImplStandardException - thrown on failure.StandardException - ResultSetNotOpen thrown if not yet open.NoPutResultSet.getNextRowCore()private ExecRow makeCurrent(java.lang.Object row) throws StandardException
StandardExceptionprivate ExecRow finalizeResults() throws StandardException
StandardExceptionprivate int sameGroupingValues(ExecRow currRow, ExecRow newRow) throws StandardException
currRow - The current row.newRow - The new row.StandardException - thrown on failure to get row locationpublic void close()
throws StandardException
close in interface ResultSetclose in class NoPutResultSetImplStandardException - thrown on errorpublic long getTimeSpent(int type)
getTimeSpent in interface ResultSettype - CURRENT_RESULTSET_ONLY - time spent only in this ResultSet
ENTIRE_RESULTSET_TREE - time spent in this ResultSet and below.public RowLocation getRowLocation() throws StandardException
getRowLocation in interface CursorResultSetStandardException - thrown on failure to get row locationCursorResultSetpublic ExecRow getCurrentRow() throws StandardException
getCurrentRow in interface CursorResultSetStandardException - thrown on failure.CursorResultSetprivate ExecIndexRow getNextRowFromRS() throws StandardException
StandardExceptionprivate ExecIndexRow getRowFromResultSet() throws StandardException
StandardExceptionprivate void setRollupColumnsToNull(ExecRow row, int resultNum) throws StandardException
StandardExceptionprivate ExecIndexRow getRowFromSorter() throws StandardException
StandardExceptionpublic void closeSource()
throws StandardException
StandardException - thrown on errorprivate void initializeVectorAggregation(ExecRow row) throws StandardException
row - the row to initializestandard - Derby exceptionStandardExceptionprivate void mergeVectorAggregates(ExecRow newRow, ExecRow currRow, int level) throws StandardException
newRow - the row to mergecurrRow - the row to merge intostandard - Derby exceptionStandardExceptionprivate void initializeDistinctMaps(int r,
boolean allocate)
throws StandardException
StandardExceptionprivate void dumpAllRows(int cR)
throws StandardException
StandardExceptionprivate java.lang.String dumpRow(ExecRow r) throws StandardException
StandardExceptionApache Derby V10.10 Internals - Copyright © 2004,2014 The Apache Software Foundation. All Rights Reserved.