org.apache.derby.impl.sql.execute
Class DistinctGroupedAggregateResultSet

java.lang.Object
  extended by org.apache.derby.impl.sql.execute.BasicNoPutResultSetImpl
      extended by org.apache.derby.impl.sql.execute.NoPutResultSetImpl
          extended by org.apache.derby.impl.sql.execute.GenericAggregateResultSet
              extended by org.apache.derby.impl.sql.execute.GroupedAggregateResultSet
                  extended by org.apache.derby.impl.sql.execute.DistinctGroupedAggregateResultSet
All Implemented Interfaces:
CursorResultSet, NoPutResultSet, ResultSet, RowLocationRetRowSource, RowSource

 class DistinctGroupedAggregateResultSet
extends GroupedAggregateResultSet

This ResultSet evaluates grouped aggregates when there is 1 or more distinct aggregate. It will scan the entire source result set and calculate the grouped aggregates when scanning the source during the first call to next(). RESOLVE - This subclass is essentially empty. Someday we will need to write additional code for distinct grouped aggregates, especially when we support multiple distinct aggregates.


Field Summary
 
Fields inherited from class org.apache.derby.impl.sql.execute.GroupedAggregateResultSet
hasDistinctAggregate, isInSortedOrder, rowsInput, rowsReturned, sortProperties
 
Fields inherited from class org.apache.derby.impl.sql.execute.GenericAggregateResultSet
aggInfoList, aggregates, originalSource, rowAllocator, source
 
Fields inherited from class org.apache.derby.impl.sql.execute.NoPutResultSetImpl
checkNullCols, clonedExecRow, cncLen, resultSetNumber, targetResultSet
 
Fields inherited from class org.apache.derby.impl.sql.execute.BasicNoPutResultSetImpl
activation, beginTime, closeTime, compactRow, constructorTime, currentRow, endExecutionTime, finished, isOpen, isTopResultSet, nextTime, numOpens, openTime, optimizerEstimatedCost, optimizerEstimatedRowCount, resultDescription, rowsFiltered, rowsSeen, startExecutionTime, subqueryTrackingArray
 
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
DistinctGroupedAggregateResultSet(NoPutResultSet s, boolean isInSortedOrder, int aggregateItem, int orderingItem, Activation a, GeneratedMethod ra, int maxRowSize, int resultSetNumber, double optimizerEstimatedRowCount, double optimizerEstimatedCost, boolean isRollup)
          Constructor
 
Method Summary
 
Methods inherited from class org.apache.derby.impl.sql.execute.GroupedAggregateResultSet
close, closeSource, getCurrentRow, getNextRowCore, getRowLocation, getTimeSpent, openCore
 
Methods inherited from class org.apache.derby.impl.sql.execute.GenericAggregateResultSet
finish, finishAggregation, getSortAggregators
 
Methods inherited from class org.apache.derby.impl.sql.execute.NoPutResultSetImpl
clearCurrentRow, clearOrderableCache, closeRowSource, getCursorName, getNextRowFromRowSource, getResultDescription, getValidColumns, isForUpdate, markRowAsDeleted, needsRowLocation, needsToClone, positionScanAtRowLocation, printQualifiers, resultSetNumber, rowLocation, setCurrentRow, setNeedsRowLocation, setTargetResultSet, skipRow, skipScan, updateRow
 
Methods inherited from class org.apache.derby.impl.sql.execute.BasicNoPutResultSetImpl
addWarning, 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, markAsTopResultSet, modifiedRowCount, open, recordConstructorTime, reopenCore, requiresRelocking, returnsRows, setAfterLastRow, setBeforeFirstRow, setCompactRow, setCompatRow
 
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, clearCurrentRow, finish, getAbsoluteRow, getActivation, getAutoGeneratedKeysResultset, getBeginExecutionTimestamp, getCursorName, getEndExecutionTimestamp, getExecuteTime, getFirstRow, getLastRow, getNextRow, getPreviousRow, getRelativeRow, getResultDescription, getRowNumber, getSubqueryTrackingArray, getWarnings, isClosed, modifiedRowCount, open, returnsRows, setAfterLastRow, setBeforeFirstRow
 

Constructor Detail

DistinctGroupedAggregateResultSet

DistinctGroupedAggregateResultSet(NoPutResultSet s,
                                  boolean isInSortedOrder,
                                  int aggregateItem,
                                  int orderingItem,
                                  Activation a,
                                  GeneratedMethod ra,
                                  int maxRowSize,
                                  int resultSetNumber,
                                  double optimizerEstimatedRowCount,
                                  double optimizerEstimatedCost,
                                  boolean isRollup)
                            throws StandardException
Constructor

Parameters:
s - input result set
isInSortedOrder - true if the source results are in sorted order
aggregateItem - 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 routine
a - activation
ra - generated method to build an empty output row
maxRowSize - approx row size, passed to sorter
resultSetNumber - The resultSetNumber for this result set
Throws:
StandardException - Thrown on error

Built on Thu 2012-03-29 21:53:33+0000, from revision ???

Apache Derby V10.6 Internals - Copyright © 2004,2007 The Apache Software Foundation. All Rights Reserved.