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

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

public 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.

Author:
jerry (broken out from SortResultSet)

Field Summary
 
Fields inherited from class org.apache.derby.impl.sql.execute.GroupedAggregateResultSet
activation, aggInfoList, aggregates, beginTime, checkGM, checkNullCols, clonedExecRow, closeCleanup, closeTime, cncLen, compactRow, constructorTime, currentRow, endExecutionTime, finished, hasDistinctAggregate, heapConglomerate, indent, isInSortedOrder, isOpen, isTopResultSet, lcc, nextTime, numOpens, openTime, optimizerEstimatedCost, optimizerEstimatedRowCount, originalSource, resultDescription, resultSetNumber, rowAllocator, rowsFiltered, rowsInput, rowsReturned, rowsSeen, sortProperties, source, sourceDepth, 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
DistinctGroupedAggregateResultSet(NoPutResultSet s, boolean isInSortedOrder, int aggregateItem, int orderingItem, Activation a, GeneratedMethod ra, int maxRowSize, int resultSetNumber, double optimizerEstimatedRowCount, double optimizerEstimatedCost, GeneratedMethod c)
          Constructor
 
Methods inherited from class org.apache.derby.impl.sql.execute.GroupedAggregateResultSet
addWarning, attachStatementContext, checkRowPosition, cleanUp, clearCurrentRow, clearOrderableCache, close, closeRowSource, closeSource, dumpTimeStats, finish, finishAggregation, finishAndRTS, getAbsoluteRow, getAutoGeneratedKeysResultset, getBeginExecutionTimestamp, getCompactRow, getCurrentRow, getCurrentTimeMillis, getCursorName, getElapsedMillis, getEndExecutionTimestamp, getEstimatedRowCount, getExecuteTime, getExecutionFactory, getFirstRow, getLanguageConnectionContext, getLastRow, getNextRow, getNextRowCore, getNextRowFromRowSource, getPointOfAttachment, getPreviousRow, getRelativeRow, getResultDescription, getRowLocation, getRowNumber, getScanIsolationLevel, getSortAggregators, getSubqueryTrackingArray, getTimeSpent, getTransactionController, getValidColumns, getWarnings, isClosed, isForUpdate, markAsTopResultSet, modifiedRowCount, needsRowLocation, needsToClone, open, openCore, printQualifiers, reopenCore, requiresRelocking, resultSetNumber, returnsRows, rowLocation, setAfterLastRow, setBeforeFirstRow, setCheckConstraints, setCompactRow, setCompatRow, setCurrentRow, setHeapConglomerate, setNeedsRowLocation, setTargetResultSet, skipRow, skipScan
 
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
 

Constructor Detail

DistinctGroupedAggregateResultSet

public DistinctGroupedAggregateResultSet(NoPutResultSet s,
                                         boolean isInSortedOrder,
                                         int aggregateItem,
                                         int orderingItem,
                                         Activation a,
                                         GeneratedMethod ra,
                                         int maxRowSize,
                                         int resultSetNumber,
                                         double optimizerEstimatedRowCount,
                                         double optimizerEstimatedCost,
                                         GeneratedMethod c)
                                  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 Mon 2007-06-04 09:58:47+0400, from revision ???

Apache Derby V10.1 Engine Documentation - Copyright © 1997,2005 The Apache Software Foundation or its licensors, as applicable.