class ScalarAggregateResultSet extends GenericAggregateResultSet implements CursorResultSet
| Modifier and Type | Field and Description |
|---|---|
protected int |
countOfRows |
protected boolean |
isInSortedOrder |
private boolean |
nextSatisfied |
int |
rowsInput |
boolean |
singleInputRow |
protected ExecIndexRow |
sourceExecIndexRow |
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 |
|---|
ScalarAggregateResultSet(NoPutResultSet s,
boolean isInSortedOrder,
int aggregateItem,
Activation a,
int ra,
int resultSetNumber,
boolean singleInputRow,
double optimizerEstimatedRowCount,
double optimizerEstimatedCost)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
accumulateScalarAggregation(ExecRow inputRow,
ExecRow accumulateRow,
boolean hasDistinctAggregates)
Run accumulation on every aggregate in this
row.
|
void |
close()
If the result set has been opened,
close the open scan.
|
ExecRow |
getCurrentRow()
This result set has its row from the last fetch done.
|
ExecRow |
getNextRowCore()
Return the next row.
|
ExecIndexRow |
getRowFromResultSet(boolean doClone)
Get a row from the input result set.
|
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 |
initializeScalarAggregation(ExecRow row) |
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...
|
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, 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 boolean singleInputRow
protected boolean isInSortedOrder
protected ExecIndexRow sourceExecIndexRow
private boolean nextSatisfied
protected int countOfRows
ScalarAggregateResultSet(NoPutResultSet s, boolean isInSortedOrder, int aggregateItem, Activation a, int ra, int resultSetNumber, boolean singleInputRow, double optimizerEstimatedRowCount, double optimizerEstimatedCost) 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 - saved object that builds an empty output rowresultSetNumber - The resultSetNumber for this result setStandardException - Thrown on errorpublic void openCore()
throws StandardException
openCore in interface NoPutResultSetStandardException - thrown if cursor finished.public ExecRow getNextRowCore() throws StandardException
getNextRowCore in interface NoPutResultSetgetNextRowCore in class BasicNoPutResultSetImplStandardException - thrown on failure.StandardException - ResultSetNotOpen thrown if not yet open.NoPutResultSet.getNextRowCore()public 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.CursorResultSetpublic ExecIndexRow getRowFromResultSet(boolean doClone) throws StandardException
doClone - - true of the row should be clonedStandardException - Thrown on errorpublic void reopenCore()
throws StandardException
reopenCore in interface NoPutResultSetreopenCore in class BasicNoPutResultSetImplStandardException - thrown if cursor finished.NoPutResultSet.openCore()protected void accumulateScalarAggregation(ExecRow inputRow, ExecRow accumulateRow, boolean hasDistinctAggregates) throws StandardException
inputRow - the input rowaccumulateRow - the row with the accumulator (may be the same as the input row.hasDistinctAggregates - does this scan have distinct
aggregates. Used to figure out whether to merge
or accumulate nondistinct aggregates.StandardException - Thrown on errorprivate void initializeScalarAggregation(ExecRow row) throws StandardException
StandardExceptionApache Derby V10.10 Internals - Copyright © 2004,2014 The Apache Software Foundation. All Rights Reserved.