Class GenericResultSetFactory

  • All Implemented Interfaces:
    ResultSetFactory

    public class GenericResultSetFactory
    extends java.lang.Object
    implements ResultSetFactory
    ResultSetFactory provides a wrapper around all of the result sets used in this execution implementation. This removes the need of generated classes to do a new and of the generator to know about all of the result sets. Both simply know about this interface to getting them.

    In terms of modularizing, we can create just an interface to this class and invoke the interface. Different implementations would get the same information provided but could potentially massage/ignore it in different ways to satisfy their implementations. The practicality of this is to be seen.

    The cost of this type of factory is that once you touch it, you touch *all* of the possible result sets, not just the ones you need. So the first time you touch it could be painful ... that might be a problem for execution.

    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      NoPutResultSet getAnyResultSet​(NoPutResultSet source, GeneratedMethod emptyRowFun, int resultSetNumber, int subqueryNumber, int pointOfAttachment, double optimizerEstimatedRowCount, double optimizerEstimatedCost)
      An any result set iterates over its source, returning a row with all columns set to nulls if the source returns no rows.
      private static Authorizer getAuthorizer​(Activation activation)  
      NoPutResultSet getBulkTableScanResultSet​(Activation activation, long conglomId, int scociItem, int resultRowTemplate, int resultSetNumber, GeneratedMethod startKeyGetter, int startSearchOperator, GeneratedMethod stopKeyGetter, int stopSearchOperator, boolean sameStartStopPosition, Qualifier[][] qualifiers, java.lang.String tableName, java.lang.String userSuppliedOptimizerOverrides, java.lang.String indexName, boolean isConstraint, boolean forUpdate, int colRefItem, int indexColItem, int lockMode, boolean tableLocked, int isolationLevel, int rowsPerRead, boolean disableForHoldable, boolean oneRowScan, double optimizerEstimatedRowCount, double optimizerEstimatedCost)
      Table/Index scan where rows are read in bulk
      ResultSet getCallStatementResultSet​(GeneratedMethod methodCall, Activation activation)
      A call statement result set simply reports that it completed.
      NoPutResultSet getCurrentOfResultSet​(java.lang.String cursorName, Activation activation, int resultSetNumber)
      A current of result set forms a result set on the current row of an open cursor.
      ResultSet getDDLResultSet​(Activation activation)
      Generic DDL result set creation.
      ResultSet getDeleteCascadeResultSet​(NoPutResultSet source, int constantActionItem, ResultSet[] dependentResultSets, java.lang.String resultSetId)
      A delete Cascade result set simply reports that it completed, and the number of rows deleted.
      ResultSet getDeleteCascadeUpdateResultSet​(NoPutResultSet source, GeneratedMethod generationClauses, GeneratedMethod checkGM, int constantActionItem, int rsdItem)
      An update result set simply reports that it completed, and the number of rows updated.
      ResultSet getDeleteResultSet​(NoPutResultSet source)
      A delete result set simply reports that it completed, and the number of rows deleted.
      ResultSet getDeleteVTIResultSet​(NoPutResultSet source)
      A delete VTI result set simply reports that it completed, and the number of rows deleted.
      NoPutResultSet getDistinctGroupedAggregateResultSet​(NoPutResultSet source, boolean isInSortedOrder, int aggregateItem, int orderItem, int rowAllocator, int maxRowSize, int resultSetNumber, double optimizerEstimatedRowCount, double optimizerEstimatedCost, boolean isRollup)
      A DistinctGroupedAggregateResultSet computes scalar aggregates when at least one of them is a distinct aggregate.
      NoPutResultSet getDistinctScalarAggregateResultSet​(NoPutResultSet source, boolean isInSortedOrder, int aggregateItem, int orderItem, int rowAllocator, int maxRowSize, int resultSetNumber, boolean singleInputRow, double optimizerEstimatedRowCount, double optimizerEstimatedCost)
      A DistinctScalarAggregateResultSet computes scalar aggregates when at least one of them is a distinct aggregate.
      NoPutResultSet getDistinctScanResultSet​(Activation activation, long conglomId, int scociItem, int resultRowTemplate, int resultSetNumber, int hashKeyColumn, java.lang.String tableName, java.lang.String userSuppliedOptimizerOverrides, java.lang.String indexName, boolean isConstraint, int colRefItem, int lockMode, boolean tableLocked, int isolationLevel, double optimizerEstimatedRowCount, double optimizerEstimatedCost)
      a distinct scan generator, for ease of use at present.
      NoPutResultSet getGroupedAggregateResultSet​(NoPutResultSet source, boolean isInSortedOrder, int aggregateItem, int orderItem, int rowAllocator, int maxRowSize, int resultSetNumber, double optimizerEstimatedRowCount, double optimizerEstimatedCost, boolean isRollup)
      A GroupedAggregateResultSet computes non-distinct grouped aggregates.
      NoPutResultSet getHashJoinResultSet​(NoPutResultSet leftResultSet, int leftNumCols, NoPutResultSet rightResultSet, int rightNumCols, GeneratedMethod joinClause, int resultSetNumber, boolean oneRowRightSide, boolean notExistsRightSide, double optimizerEstimatedRowCount, double optimizerEstimatedCost, java.lang.String userSuppliedOptimizerOverrides)
      A hash join.
      NoPutResultSet getHashLeftOuterJoinResultSet​(NoPutResultSet leftResultSet, int leftNumCols, NoPutResultSet rightResultSet, int rightNumCols, GeneratedMethod joinClause, int resultSetNumber, GeneratedMethod emptyRowFun, boolean wasRightOuterJoin, boolean oneRowRightSide, boolean notExistsRightSide, double optimizerEstimatedRowCount, double optimizerEstimatedCost, java.lang.String userSuppliedOptimizerOverrides)
      A left outer join using a hash join.
      NoPutResultSet getHashScanResultSet​(Activation activation, long conglomId, int scociItem, int resultRowTemplate, int resultSetNumber, GeneratedMethod startKeyGetter, int startSearchOperator, GeneratedMethod stopKeyGetter, int stopSearchOperator, boolean sameStartStopPosition, Qualifier[][] scanQualifiers, Qualifier[][] nextQualifiers, int initialCapacity, float loadFactor, int maxCapacity, int hashKeyColumn, java.lang.String tableName, java.lang.String userSuppliedOptimizerOverrides, java.lang.String indexName, boolean isConstraint, boolean forUpdate, int colRefItem, int indexColItem, int lockMode, boolean tableLocked, int isolationLevel, double optimizerEstimatedRowCount, double optimizerEstimatedCost)
      a hash scan generator, for ease of use at present.
      NoPutResultSet getHashTableResultSet​(NoPutResultSet source, GeneratedMethod singleTableRestriction, Qualifier[][] equijoinQualifiers, GeneratedMethod projection, int resultSetNumber, int mapRefItem, boolean reuseResult, int keyColItem, boolean removeDuplicates, long maxInMemoryRowCount, int initialCapacity, float loadFactor, double optimizerEstimatedRowCount, double optimizerEstimatedCost)
      A hash table result set builds a hash table on its source, applying a list of predicates, if any, to the source, when building the hash table.
      NoPutResultSet getIndexRowToBaseRowResultSet​(long conglomId, int scociItem, NoPutResultSet source, int resultRowAllocator, int resultSetNumber, java.lang.String indexName, int heapColRefItem, int allColRefItem, int heapOnlyColRefItem, int indexColMapItem, GeneratedMethod restriction, boolean forUpdate, double optimizerEstimatedRowCount, double optimizerEstimatedCost, int baseColumnCount)
      An index row to base row result set gets an index row from its source and uses the RowLocation in its last column to get the row from the base conglomerate.
      ResultSet getInsertResultSet​(NoPutResultSet source, GeneratedMethod generationClauses, GeneratedMethod checkGM, int fullTemplate, java.lang.String schemaName, java.lang.String tableName)
      An insert result set simply reports that it completed, and the number of rows inserted.
      ResultSet getInsertVTIResultSet​(NoPutResultSet source, NoPutResultSet vtiRS)
      An insert VTI result set simply reports that it completed, and the number of rows inserted.
      NoPutResultSet getLastIndexKeyResultSet​(Activation activation, int resultSetNumber, int resultRowTemplate, long conglomId, java.lang.String tableName, java.lang.String userSuppliedOptimizerOverrides, java.lang.String indexName, int colRefItem, int lockMode, boolean tableLocked, int isolationLevel, double optimizerEstimatedRowCount, double optimizerEstimatedCost)
      A last index key sresult set returns the last row from the index in question.
      NoPutResultSet getMaterializedResultSet​(NoPutResultSet source, int resultSetNumber, double optimizerEstimatedRowCount, double optimizerEstimatedCost)
      A ResultSet which materializes the underlying ResultSet tree into a temp table on the 1st open.
      ResultSet getMergeResultSet​(NoPutResultSet drivingLeftJoin)
      A MERGE result set simply reports that it completed, and the number of rows that it INSERTed/UPDATEd/DELETEdd.
      ResultSet getMiscResultSet​(Activation activation)
      Generic Misc result set creation.
      NoPutResultSet getMultiProbeTableScanResultSet​(Activation activation, long conglomId, int scociItem, int resultRowTemplate, int resultSetNumber, GeneratedMethod startKeyGetter, int startSearchOperator, GeneratedMethod stopKeyGetter, int stopSearchOperator, boolean sameStartStopPosition, Qualifier[][] qualifiers, DataValueDescriptor[] probeVals, int sortRequired, java.lang.String tableName, java.lang.String userSuppliedOptimizerOverrides, java.lang.String indexName, boolean isConstraint, boolean forUpdate, int colRefItem, int indexColItem, int lockMode, boolean tableLocked, int isolationLevel, boolean oneRowScan, double optimizerEstimatedRowCount, double optimizerEstimatedCost)
      Multi-probing scan that probes an index for specific values contained in the received probe list.
      NoPutResultSet getNestedLoopJoinResultSet​(NoPutResultSet leftResultSet, int leftNumCols, NoPutResultSet rightResultSet, int rightNumCols, GeneratedMethod joinClause, int resultSetNumber, boolean oneRowRightSide, boolean notExistsRightSide, double optimizerEstimatedRowCount, double optimizerEstimatedCost, java.lang.String userSuppliedOptimizerOverrides)
      A nested loop left outer join result set forms a result set on top of 2 other result sets.
      NoPutResultSet getNestedLoopLeftOuterJoinResultSet​(NoPutResultSet leftResultSet, int leftNumCols, NoPutResultSet rightResultSet, int rightNumCols, GeneratedMethod joinClause, int resultSetNumber, GeneratedMethod emptyRowFun, boolean wasRightOuterJoin, boolean oneRowRightSide, boolean notExistsRightSide, double optimizerEstimatedRowCount, double optimizerEstimatedCost, java.lang.String userSuppliedOptimizerOverrides)
      A nested loop join result set forms a result set on top of 2 other result sets.
      NoPutResultSet getNormalizeResultSet​(NoPutResultSet source, int resultSetNumber, int erdNumber, double optimizerEstimatedRowCount, double optimizerEstimatedCost, boolean forUpdate)
      REMIND: needs more description...
      NoPutResultSet getOnceResultSet​(NoPutResultSet source, GeneratedMethod emptyRowFun, int cardinalityCheck, int resultSetNumber, int subqueryNumber, int pointOfAttachment, double optimizerEstimatedRowCount, double optimizerEstimatedCost)
      A once result set iterates over its source, raising an error if the source returns > 1 row and returning a row with all columns set to nulls if the source returns no rows.
      NoPutResultSet getProjectRestrictResultSet​(NoPutResultSet source, GeneratedMethod restriction, GeneratedMethod projection, int resultSetNumber, GeneratedMethod constantRestriction, int mapRefItem, int cloneMapItem, boolean reuseResult, boolean doesProjection, boolean validatingCheckConstraint, java.lang.String validatingBaseTableUUIDString, double optimizerEstimatedRowCount, double optimizerEstimatedCost)
      A project restrict result set iterates over its source, evaluating a restriction and when it is satisfied, constructing a row to return in its result set based on its projection.
      NoPutResultSet getRaDependentTableScanResultSet​(Activation activation, long conglomId, int scociItem, int resultRowTemplate, int resultSetNumber, GeneratedMethod startKeyGetter, int startSearchOperator, GeneratedMethod stopKeyGetter, int stopSearchOperator, boolean sameStartStopPosition, Qualifier[][] qualifiers, java.lang.String tableName, java.lang.String userSuppliedOptimizerOverrides, java.lang.String indexName, boolean isConstraint, boolean forUpdate, int colRefItem, int indexColItem, int lockMode, boolean tableLocked, int isolationLevel, boolean oneRowScan, double optimizerEstimatedRowCount, double optimizerEstimatedCost, java.lang.String parentResultSetId, long fkIndexConglomId, int fkColArrayItem, int rltItem)
      a referential action dependent table scan generator.
      NoPutResultSet getRowCountResultSet​(NoPutResultSet source, Activation activation, int resultSetNumber, GeneratedMethod offsetMethod, GeneratedMethod fetchFirstMethod, boolean hasJDBClimitClause, double optimizerEstimatedRowCount, double optimizerEstimatedCost)
      This result sets implements the filtering needed by and .
      NoPutResultSet getRowResultSet​(Activation activation, GeneratedMethod row, boolean canCacheRow, int resultSetNumber, double optimizerEstimatedRowCount, double optimizerEstimatedCost)
      A row result set forms a result set on a single, known row value.
      NoPutResultSet getScalarAggregateResultSet​(NoPutResultSet source, boolean isInSortedOrder, int aggregateItem, int orderItem, int rowAllocator, int maxRowSize, int resultSetNumber, boolean singleInputRow, double optimizerEstimatedRowCount, double optimizerEstimatedCost)
      A ScalarAggregateResultSet computes non-distinct scalar aggregates.
      NoPutResultSet getScrollInsensitiveResultSet​(NoPutResultSet source, Activation activation, int resultSetNumber, int sourceRowWidth, boolean scrollable, double optimizerEstimatedRowCount, double optimizerEstimatedCost)
      A ResultSet which provides the insensitive scrolling functionality for the underlying result set by materializing the underlying ResultSet tree into a hash table while scrolling forward.
      NoPutResultSet getSetOpResultSet​(NoPutResultSet leftSource, NoPutResultSet rightSource, Activation activation, int resultSetNumber, long optimizerEstimatedRowCount, double optimizerEstimatedCost, int opType, boolean all, int intermediateOrderByColumnsSavedObject, int intermediateOrderByDirectionSavedObject, int intermediateOrderByNullsLowSavedObject)
      The SetOpResultSet is used to implement an INTERSECT or EXCEPT operation.
      ResultSet getSetTransactionResultSet​(Activation activation)  
      NoPutResultSet getSortResultSet​(NoPutResultSet source, boolean distinct, boolean isInSortedOrder, int orderItem, int rowAllocator, int maxRowSize, int resultSetNumber, double optimizerEstimatedRowCount, double optimizerEstimatedCost)
      A sort result set sorts its source and if requested removes duplicates.
      NoPutResultSet getTableScanResultSet​(Activation activation, long conglomId, int scociItem, int resultRowTemplate, int resultSetNumber, GeneratedMethod startKeyGetter, int startSearchOperator, GeneratedMethod stopKeyGetter, int stopSearchOperator, boolean sameStartStopPosition, Qualifier[][] qualifiers, java.lang.String tableName, java.lang.String userSuppliedOptimizerOverrides, java.lang.String indexName, boolean isConstraint, boolean forUpdate, int colRefItem, int indexColItem, int lockMode, boolean tableLocked, int isolationLevel, boolean oneRowScan, double optimizerEstimatedRowCount, double optimizerEstimatedCost)
      a minimal table scan generator, for ease of use at present.
      NoPutResultSet getUnionResultSet​(NoPutResultSet leftResultSet, NoPutResultSet rightResultSet, int resultSetNumber, double optimizerEstimatedRowCount, double optimizerEstimatedCost)
      a minimal union scan generator, for ease of use at present.
      ResultSet getUpdateResultSet​(NoPutResultSet source, GeneratedMethod generationClauses, GeneratedMethod checkGM)
      An update result set simply reports that it completed, and the number of rows updated.
      ResultSet getUpdateVTIResultSet​(NoPutResultSet source)  
      NoPutResultSet getValidateCheckConstraintResultSet​(Activation activation, long conglomId, int scociItem, int resultRowTemplate, int resultSetNumber, GeneratedMethod startKeyGetter, int startSearchOperator, GeneratedMethod stopKeyGetter, int stopSearchOperator, boolean sameStartStopPosition, Qualifier[][] qualifiers, java.lang.String tableName, java.lang.String userSuppliedOptimizerOverrides, java.lang.String indexName, boolean isConstraint, boolean forUpdate, int colRefItem, int indexColItem, int lockMode, boolean tableLocked, int isolationLevel, boolean oneRowScan, double optimizerEstimatedRowCount, double optimizerEstimatedCost)
      A table scan result set forms a result set on a scan of a table.
      NoPutResultSet getVTIResultSet​(Activation activation, int row, int resultSetNumber, GeneratedMethod constructor, java.lang.String javaClassName, Qualifier[][] pushedQualifiers, int erdNumber, boolean version2, boolean reuseablePs, int ctcNumber, boolean isTarget, int scanIsolationLevel, double optimizerEstimatedRowCount, double optimizerEstimatedCost, boolean isDerbyStyleTableFunction, int returnTypeNumber, int vtiProjectionNumber, int vtiRestrictionNumber, java.lang.String vtiSchema, java.lang.String vtiName)
      A VTI result set wraps a user supplied result set.
      NoPutResultSet getWindowResultSet​(Activation activation, NoPutResultSet source, int rowAllocator, int resultSetNumber, int erdNumber, GeneratedMethod restriction, double optimizerEstimatedRowCount, double optimizerEstimatedCost)
      A OLAP window on top of a regular result set.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait