CursorResultSet
, NoPutResultSet
, ResultSet
, RowLocationRetRowSource
, RowSource
DistinctScalarAggregateResultSet
class ScalarAggregateResultSet extends GenericAggregateResultSet implements CursorResultSet
BasicNoPutResultSetImpl.FieldComparator
Modifier and Type | Field | Description |
---|---|---|
protected int |
countOfRows |
|
protected boolean |
isInSortedOrder |
|
private boolean |
nextSatisfied |
|
int |
rowsInput |
|
boolean |
singleInputRow |
|
protected ExecIndexRow |
sourceExecIndexRow |
activation, beginTime, closeTime, compactRow, constructorTime, currentRow, endExecutionTime, finished, isOpen, isTopResultSet, nextTime, numOpens, openTime, optimizerEstimatedCost, optimizerEstimatedRowCount, resultDescription, rowsFiltered, rowsSeen, startExecutionTime, subqueryTrackingArray
aggInfoList, aggregates, originalSource, source
ABSOLUTE, FIRST, LAST, NEXT, PREVIOUS, RELATIVE, TEMPORARY_RESULT_SET_NUMBER
checkNullCols, clonedExecRow, cncLen, resultSetNumber, targetResultSet
CURRENT_RESULTSET_ONLY, ENTIRE_RESULTSET_TREE, ISAFTERLAST, ISBEFOREFIRST, ISFIRST, ISLAST
Constructor | 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 | 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...
|
addWarning, attachStatementContext, checkCancellationFlag, checkRowPosition, childrenToXML, 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, setCompatRow, toXML
finish, finishAggregation, getRowTemplate, getSortAggregators, toXML
clearCurrentRow, clearOrderableCache, closeRowSource, getCursorName, getNextRowFromRowSource, getResultDescription, getValidColumns, isForUpdate, markRowAsDeleted, needsRowLocation, needsRowLocationForDeferredCheckConstraints, needsToClone, offendingRowLocation, positionScanAtRowLocation, printQualifiers, resultSetNumber, rowLocation, setCurrentRow, setHasDeferrableChecks, setNeedsRowLocation, setTargetResultSet, skipRow, skipScan, unpackHashValue, updateRow
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addWarning, 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, setBeforeFirstRow, toXML
public 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 NoPutResultSet
StandardException
- thrown if cursor finished.public ExecRow getNextRowCore() throws StandardException
getNextRowCore
in interface NoPutResultSet
getNextRowCore
in class BasicNoPutResultSetImpl
StandardException
- thrown on failure.StandardException
- ResultSetNotOpen thrown if not yet open.NoPutResultSet.getNextRowCore()
public void close() throws StandardException
close
in interface ResultSet
close
in class NoPutResultSetImpl
StandardException
- thrown on errorpublic long getTimeSpent(int type)
getTimeSpent
in interface ResultSet
type
- 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 CursorResultSet
StandardException
- thrown on failure to get row locationCursorResultSet
public ExecRow getCurrentRow() throws StandardException
getCurrentRow
in interface CursorResultSet
StandardException
- thrown on failure.CursorResultSet
public ExecIndexRow getRowFromResultSet(boolean doClone) throws StandardException
doClone
- - true of the row should be clonedStandardException
- Thrown on errorpublic void reopenCore() throws StandardException
reopenCore
in interface NoPutResultSet
reopenCore
in class BasicNoPutResultSetImpl
StandardException
- 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
StandardException
Apache Derby V10.14 Internals - Copyright © 2004,2018 The Apache Software Foundation. All Rights Reserved.