Interface ResultSetFactory

All Known Implementing Classes:
GenericResultSetFactory

public interface ResultSetFactory
ResultSetFactory provides a wrapper around all of the result sets needed in an execution implementation.

For the activations to avoid searching for this module in their execute methods, the base activation supertype should implement a method that does the lookup and salts away this factory for the activation to use as it needs it.

  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    Module name for the monitor's module locating system.
  • Method Summary

    Modifier and Type
    Method
    Description
    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.
    getBulkTableScanResultSet(Activation activation, long conglomId, int scociItem, int resultRowTemplate, int resultSetNumber, GeneratedMethod startKeyGetter, int startSearchOperator, GeneratedMethod stopKeyGetter, int stopSearchOperator, boolean sameStartStopPosition, Qualifier[][] qualifiers, String tableName, String userSuppliedOptimizerOverrides, 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)
    A table scan result set forms a result set on a scan of a table.
    A call statement result set simply reports that it completed.
    getCurrentOfResultSet(String cursorName, Activation activation, int resultSetNumber)
    A current of result set forms a result set on the current row of an open cursor.
    Generic DDL result set creation.
    getDeleteCascadeResultSet(NoPutResultSet source, int constantActionItem, ResultSet[] dependentResultSets, String resultSetId)
    A delete Cascade result set simply reports that it completed, and the number of rows deleted.
    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.
    A delete result set simply reports that it completed, and the number of rows deleted.
    A delete VTI result set simply reports that it completed, and the number of rows deleted.
    getDistinctGroupedAggregateResultSet(NoPutResultSet source, boolean isInSortedOrder, int aggregateItem, int orderingItem, int rowAllocator, int rowSize, int resultSetNumber, double optimizerEstimatedRowCount, double optimizerEstimatedCost, boolean isRollup)
    A DistinctGroupedAggregateResultSet computes scalar aggregates when at least one of them is a distinct aggregate.
    getDistinctScalarAggregateResultSet(NoPutResultSet source, boolean isInSortedOrder, int aggregateItem, int orderingItem, int rowAllocator, int rowSize, int resultSetNumber, boolean singleInputRow, double optimizerEstimatedRowCount, double optimizerEstimatedCost)
    A DistinctScalarAggregateResultSet computes scalar aggregates when at least one of them is a distinct aggregate.
    getDistinctScanResultSet(Activation activation, long conglomId, int scociItem, int resultRowTemplate, int resultSetNumber, int hashKeyColumn, String tableName, String userSuppliedOptimizerOverrides, String indexName, boolean isConstraint, int colRefItem, int lockMode, boolean tableLocked, int isolationLevel, double optimizerEstimatedRowCount, double optimizerEstimatedCost)
    A distinct scan result set pushes duplicate elimination into the scan.
    getGroupedAggregateResultSet(NoPutResultSet source, boolean isInSortedOrder, int aggregateItem, int orderingItem, int rowAllocator, int rowSize, int resultSetNumber, double optimizerEstimatedRowCount, double optimizerEstimatedCost, boolean isRollup)
    A GroupedAggregateResultSet computes non-distinct grouped aggregates.
    getHashJoinResultSet(NoPutResultSet leftResultSet, int leftNumCols, NoPutResultSet rightResultSet, int rightNumCols, GeneratedMethod joinClause, int resultSetNumber, boolean oneRowRightSide, boolean notExistsRightSide, double optimizerEstimatedRowCount, double optimizerEstimatedCost, String userSuppliedOptimizerOverrides)
    A hash join.
    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, String userSuppliedOptimizerOverrides)
    A left outer join using a hash join.
    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, String tableName, String userSuppliedOptimizerOverrides, String indexName, boolean isConstraint, boolean forUpdate, int colRefItem, int indexColItem, int lockMode, boolean tableLocked, int isolationLevel, double optimizerEstimatedRowCount, double optimizerEstimatedCost)
    A hash result set forms a result set on a hash table built on a scan of a table.
    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.
    getIndexRowToBaseRowResultSet(long conglomId, int scoci, NoPutResultSet source, int resultRowAllocator, int resultSetNumber, 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.
    getInsertResultSet(NoPutResultSet source, GeneratedMethod generationClauses, GeneratedMethod checkGM, int fullTemplate, String schemaNameName, String tableName)
    An insert result set simply reports that it completed, and the number of rows inserted.
    An insert VTI result set simply reports that it completed, and the number of rows inserted.
    getLastIndexKeyResultSet(Activation activation, int resultSetNumber, int resultRowTemplate, long conglomId, String tableName, String userSuppliedOptimizerOverrides, String indexName, int colRefItem, int lockMode, boolean tableLocked, int isolationLevel, double optimizerEstimatedRowCount, double optimizerEstimatedCost)
    A last index key result set returns the last row from the index in question.
    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.
    A MERGE result set simply reports that it completed, and the number of rows that it INSERTed/UPDATEd/DELETEdd.
    Generic Misc result set creation.
    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, String tableName, String userSuppliedOptimizerOverrides, String indexName, boolean isConstraint, boolean forUpdate, int colRefItem, int indexColItem, int lockMode, boolean tableLocked, int isolationLevel, boolean oneRowScan, double optimizerEstimatedRowCount, double optimizerEstimatedCost)
    A multi-probe result set, used for probing an index with one or more target values (probeValues) and returning the matching rows.
    getNestedLoopJoinResultSet(NoPutResultSet leftResultSet, int leftNumCols, NoPutResultSet rightResultSet, int rightNumCols, GeneratedMethod joinClause, int resultSetNumber, boolean oneRowRightSide, boolean notExistsRightSide, double optimizerEstimatedRowCount, double optimizerEstimatedCost, String userSuppliedOptimizerOverrides)
    A nested loop left outer join result set forms a result set on top of 2 other result sets.
    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, String userSuppliedOptimizerOverrides)
    A nested loop join result set forms a result set on top of 2 other result sets.
    getNormalizeResultSet(NoPutResultSet source, int resultSetNumber, int erdNumber, double optimizerEstimatedRowCount, double optimizerEstimatedCost, boolean forUpdate)
    REMIND: needs more description...
    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.
    getProjectRestrictResultSet(NoPutResultSet source, GeneratedMethod restriction, GeneratedMethod projection, int resultSetNumber, GeneratedMethod constantRestriction, int mapArrayItem, int cloneMapItem, boolean reuseResult, boolean doesProjection, boolean validatingCheckConstraint, 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.
    getRaDependentTableScanResultSet(Activation activation, long conglomId, int scociItem, int resultRowTemplate, int resultSetNumber, GeneratedMethod startKeyGetter, int startSearchOperator, GeneratedMethod stopKeyGetter, int stopSearchOperator, boolean sameStartStopPosition, Qualifier[][] qualifiers, String tableName, String userSuppliedOptimizerOverrides, String indexName, boolean isConstraint, boolean forUpdate, int colRefItem, int indexColItem, int lockMode, boolean tableLocked, int isolationLevel, boolean oneRowScan, double optimizerEstimatedRowCount, double optimizerEstimatedCost, String parentResultSetId, long fkIndexConglomId, int fkColArrayItem, int rltItem)
    A Dependent table scan result set forms a result set on a scan of a dependent table for the rows that got materialized on the scan of its parent table and if the row being deleted on parent table has a reference in the dependent table.
    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 .
    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.
    getScalarAggregateResultSet(NoPutResultSet source, boolean isInSortedOrder, int aggregateItem, int orderingItem, int rowAllocator, int rowSize, int resultSetNumber, boolean singleInputRow, double optimizerEstimatedRowCount, double optimizerEstimatedCost)
    A ScalarAggregateResultSet computes non-distinct scalar aggregates.
    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.
    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.
     
    getSortResultSet(NoPutResultSet source, boolean distinct, boolean isInSortedOrder, int orderItem, int rowAllocator, int rowSize, int resultSetNumber, double optimizerEstimatedRowCount, double optimizerEstimatedCost)
    A sort result set sorts its source and if requested removes duplicates.
    getTableScanResultSet(Activation activation, long conglomId, int scociItem, int resultRowTemplate, int resultSetNumber, GeneratedMethod startKeyGetter, int startSearchOperator, GeneratedMethod stopKeyGetter, int stopSearchOperator, boolean sameStartStopPosition, Qualifier[][] qualifiers, String tableName, String userSuppliedOptimizerOverrides, String indexName, boolean isConstraint, boolean forUpdate, int colRefItem, int indexColItem, int lockMode, boolean tableLocked, int isolationLevel, boolean oneRowScan, double optimizerEstimatedRowCount, double optimizerEstimatedCost)
     
    getUnionResultSet(NoPutResultSet source1, NoPutResultSet source2, int resultSetNumber, double optimizerEstimatedRowCount, double optimizerEstimatedCost)
    The Union interface is used to evaluate the union (all) of two ResultSets.
    getUpdateResultSet(NoPutResultSet source, GeneratedMethod generationClauses, GeneratedMethod checkGM)
    An update result set simply reports that it completed, and the number of rows updated.
     
    getValidateCheckConstraintResultSet(Activation activation, long conglomId, int scociItem, int resultRowTemplate, int resultSetNumber, GeneratedMethod startKeyGetter, int startSearchOperator, GeneratedMethod stopKeyGetter, int stopSearchOperator, boolean sameStartStopPosition, Qualifier[][] qualifiers, String tableName, String userSuppliedOptimizerOverrides, 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.
    getVTIResultSet(Activation activation, int row, int resultSetNumber, GeneratedMethod constructor, 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, String vtiSchema, String vtiName)
    A VTI result set wraps a user supplied result set.
    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.
  • Field Details

  • Method Details

    • getDDLResultSet

      ResultSet getDDLResultSet(Activation activation) throws StandardException
      Generic DDL result set creation.
      Parameters:
      activation - the activation for this result set
      Returns:
      ResultSet A wrapper result set to run the Execution-time logic.
      Throws:
      StandardException - thrown when unable to create the result set
    • getMiscResultSet

      ResultSet getMiscResultSet(Activation activation) throws StandardException
      Generic Misc result set creation.
      Parameters:
      activation - the activation for this result set
      Returns:
      ResultSet A wrapper result set to run the Execution-time logic.
      Throws:
      StandardException - thrown when unable to create the result set
    • getSetTransactionResultSet

      ResultSet getSetTransactionResultSet(Activation activation) throws StandardException
      Parameters:
      activation - the activation for this result set
      Returns:
      ResultSet A wrapper result set to run the Execution-time logic.
      Throws:
      StandardException - thrown when unable to create the result set
    • getInsertResultSet

      ResultSet getInsertResultSet(NoPutResultSet source, GeneratedMethod generationClauses, GeneratedMethod checkGM, int fullTemplate, String schemaNameName, String tableName) throws StandardException
      An insert result set simply reports that it completed, and the number of rows inserted. It does not return rows. The insert has been completed once the insert result set is available.
      Parameters:
      source - the result set from which to take rows to be inserted into the target table.
      generationClauses - The code to compute column generation clauses if any
      checkGM - The code to enforce the check constraints, if any
      fullTemplate - Saved item for a row template used by bulk insert, or -1 if this is not a bulk insert
      schemaNameName - schema name of table
      tableName - table name
      Returns:
      the insert operation as a result set.
      Throws:
      StandardException - thrown when unable to perform the insert
    • getInsertVTIResultSet

      ResultSet getInsertVTIResultSet(NoPutResultSet source, NoPutResultSet vtiRS) throws StandardException
      An insert VTI result set simply reports that it completed, and the number of rows inserted. It does not return rows. The insert has been completed once the insert result set is available.
      Parameters:
      source - the result set from which to take rows to be inserted into the target table.
      vtiRS - The code to instantiate the VTI, if necessary
      Returns:
      the insert VTI operation as a result set.
      Throws:
      StandardException - thrown when unable to perform the insert
    • getDeleteVTIResultSet

      ResultSet getDeleteVTIResultSet(NoPutResultSet source) throws StandardException
      A delete VTI result set simply reports that it completed, and the number of rows deleted. It does not return rows. The delete has been completed once the delete result set is available.
      Parameters:
      source - the result set from which to take rows to be inserted into the target table.
      Returns:
      the delete VTI operation as a result set.
      Throws:
      StandardException - thrown when unable to perform the insert
    • getDeleteResultSet

      ResultSet getDeleteResultSet(NoPutResultSet source) throws StandardException
      A delete result set simply reports that it completed, and the number of rows deleted. It does not return rows. The delete has been completed once the delete result set is available.
      Parameters:
      source - the result set from which to take rows to be deleted from the target table. This result set must contain one column which provides RowLocations that are valid in the target table.
      Returns:
      the delete operation as a result set.
      Throws:
      StandardException - thrown when unable to perform the delete
    • getMergeResultSet

      ResultSet getMergeResultSet(NoPutResultSet drivingLeftJoin) throws StandardException
      A MERGE result set simply reports that it completed, and the number of rows that it INSERTed/UPDATEd/DELETEdd. It does not return rows. The delete has been completed once the MERGE result set is available.
      Parameters:
      drivingLeftJoin - the result set from which to take rows to be drive the INSERT/UPDATE/DELETE operations.
      Returns:
      the MERGE operation as a result set.
      Throws:
      StandardException - thrown when unable to perform the work
    • getDeleteCascadeResultSet

      ResultSet getDeleteCascadeResultSet(NoPutResultSet source, int constantActionItem, ResultSet[] dependentResultSets, String resultSetId) throws StandardException
      A delete Cascade result set simply reports that it completed, and the number of rows deleted. It does not return rows. The delete has been completed once the delete result set is available.
      Parameters:
      source - the result set from which to take rows to be deleted from the target table.
      constantActionItem - a constant action saved object reference
      dependentResultSets - an array of DeleteCascade Resultsets for the current table referential action dependents tables.
      resultSetId - an Id which is used to store the refence to the temporary result set created of the materilized rows.Dependent table resultsets uses the same id to access their parent temporary result sets.
      Returns:
      the delete operation as a delete cascade result set.
      Throws:
      StandardException - thrown when unable to perform the delete
    • getUpdateResultSet

      ResultSet getUpdateResultSet(NoPutResultSet source, GeneratedMethod generationClauses, GeneratedMethod checkGM) throws StandardException
      An update result set simply reports that it completed, and the number of rows updated. It does not return rows. The update has been completed once the update result set is available.
      Parameters:
      source - the result set from which to take rows to be updated in the target table. This result set must contain a column which provides RowLocations that are valid in the target table, and new values to be placed in those rows.
      generationClauses - The code to compute column generation clauses if any
      checkGM - The code to enforce the check constraints, if any
      Returns:
      the update operation as a result set.
      Throws:
      StandardException - thrown when unable to perform the update
    • getUpdateVTIResultSet

      ResultSet getUpdateVTIResultSet(NoPutResultSet source) throws StandardException
      Parameters:
      source - the result set from which to take rows to be updated in the target table.
      Returns:
      the update operation as a result set.
      Throws:
      StandardException - thrown on error
    • getDeleteCascadeUpdateResultSet

      ResultSet getDeleteCascadeUpdateResultSet(NoPutResultSet source, GeneratedMethod generationClauses, GeneratedMethod checkGM, int constantActionItem, int rsdItem) throws StandardException
      An update result set simply reports that it completed, and the number of rows updated. It does not return rows. The update has been completed once the update result set is available.
      Parameters:
      source - the result set from which to take rows to be updated in the target table. This result set must contain a column which provides RowLocations that are valid in the target table, and new values to be placed in those rows.
      generationClauses - The code to compute generated columns, if any
      checkGM - The code to enforce the check constraints, if any
      constantActionItem - a constant action saved object reference
      rsdItem - result Description, saved object id.
      Returns:
      the update operation as a result set.
      Throws:
      StandardException - thrown when unable to perform the update
    • getCallStatementResultSet

      ResultSet getCallStatementResultSet(GeneratedMethod methodCall, Activation activation) throws StandardException
      A call statement result set simply reports that it completed. It does not return rows.
      Parameters:
      methodCall - a reference to a method in the activation for the method call
      activation - the activation for this result set
      Returns:
      the call statement operation as a result set.
      Throws:
      StandardException - thrown when unable to perform the call statement
    • getProjectRestrictResultSet

      NoPutResultSet getProjectRestrictResultSet(NoPutResultSet source, GeneratedMethod restriction, GeneratedMethod projection, int resultSetNumber, GeneratedMethod constantRestriction, int mapArrayItem, int cloneMapItem, boolean reuseResult, boolean doesProjection, boolean validatingCheckConstraint, String validatingBaseTableUUIDString, double optimizerEstimatedRowCount, double optimizerEstimatedCost) throws StandardException
      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. The rows can be constructed as they are requested from the result set.
      Parameters:
      source - the result set from which to take rows to be filtered by this operation.
      restriction - a reference to a method in the activation that is applied to the activation's "current row" field to determine whether the restriction is satisfied or not. The signature of this method is Boolean restriction() throws StandardException;
      projection - a reference to a method in the activation that is applied to the activation's "current row" field to project out the expected result row. The signature of this method is ExecRow projection() throws StandardException;
      resultSetNumber - The resultSetNumber for the ResultSet
      constantRestriction - a reference to a method in the activation that represents a constant expression (eg where 1 = 2). The signature of this method is Boolean restriction() throws StandardException;
      mapArrayItem - Item # for mapping of source to target columns
      cloneMapItem - Item # for columns that need cloning
      reuseResult - Whether or not to reuse the result row.
      doesProjection - Whether or not this PRN does a projection
      validatingCheckConstraint - true if this PRN is used to for validating a deferred check constraint.
      validatingBaseTableUUIDString - The uuid for the table being validated.
      optimizerEstimatedRowCount - Estimated total # of rows by optimizer
      optimizerEstimatedCost - Estimated total cost by optimizer
      Returns:
      the project restrict operation as a result set.
      Throws:
      StandardException - thrown when unable to create the result set
    • getHashTableResultSet

      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) throws StandardException
      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. It then does a look up into the hash table on a probe. The rows can be constructed as they are requested from the result set.
      Parameters:
      source - the result set from which to take rows to be filtered by this operation.
      singleTableRestriction - restriction, if any, applied to input of hash table.
      equijoinQualifiers - Qualifier[] for look up into hash table
      projection - a reference to a method in the activation that is applied to the activation's "current row" field to project out the expected result row. The signature of this method is ExecRow projection() throws StandardException;
      resultSetNumber - The resultSetNumber for the ResultSet
      mapRefItem - Item # for mapping of source to target columns
      reuseResult - Whether or not to reuse the result row.
      keyColItem - Item for hash key column array
      removeDuplicates - Whether or not to remove duplicates when building the hash table
      maxInMemoryRowCount - Max size of in-memory hash table
      initialCapacity - initialCapacity for java.util.HashTable
      loadFactor - loadFactor for java.util.HashTable
      optimizerEstimatedRowCount - Estimated total # of rows by optimizer
      optimizerEstimatedCost - Estimated total cost by optimizer
      Returns:
      the project restrict operation as a result set.
      Throws:
      StandardException - thrown when unable to create the result set
    • getSortResultSet

      NoPutResultSet getSortResultSet(NoPutResultSet source, boolean distinct, boolean isInSortedOrder, int orderItem, int rowAllocator, int rowSize, int resultSetNumber, double optimizerEstimatedRowCount, double optimizerEstimatedCost) throws StandardException
      A sort result set sorts its source and if requested removes duplicates. It will generate the entire result when open, and then return it a row at a time.

      If passed aggregates it will do scalar or vector aggregate processing. A list of aggregator information is passed off of the PreparedStatement's savedObjects. Aggregation and SELECT DISTINCT cannot be processed in the same sort.

      Parameters:
      source - the result set from which to take rows to be filtered by this operation.
      distinct - true if distinct SELECT list
      isInSortedOrder - true if the source result set is in sorted order
      orderItem - entry in preparedStatement's savedObjects for order
      rowAllocator - a reference to a saved object that generates rows of the right size and shape for the source
      rowSize - the size of the row that is allocated by rowAllocator. size should be the maximum size of the sum of all the datatypes. user type are necessarily approximated
      resultSetNumber - The resultSetNumber for the ResultSet
      optimizerEstimatedRowCount - Estimated total # of rows by optimizer
      optimizerEstimatedCost - Estimated total cost by optimizer
      Returns:
      the distinct operation as a result set.
      Throws:
      StandardException - thrown when unable to create the result set
    • getScalarAggregateResultSet

      NoPutResultSet getScalarAggregateResultSet(NoPutResultSet source, boolean isInSortedOrder, int aggregateItem, int orderingItem, int rowAllocator, int rowSize, int resultSetNumber, boolean singleInputRow, double optimizerEstimatedRowCount, double optimizerEstimatedCost) throws StandardException
      A ScalarAggregateResultSet computes non-distinct scalar aggregates. It will compute the aggregates when open.
      Parameters:
      source - the result set from which to take rows to be filtered by this operation.
      isInSortedOrder - true if the source result set is in sorted order
      aggregateItem - entry in preparedStatement's savedObjects for aggregates
      orderingItem - Ignored to allow same signature as getDistinctScalarAggregateResultSet
      rowAllocator - a reference to a saved object that generates rows of the right size and shape for the source
      rowSize - Ignored to allow same signature as getDistinctScalarAggregateResultSet
      resultSetNumber - The resultSetNumber for the ResultSet
      singleInputRow - Whether we know we have a single input row or not
      optimizerEstimatedRowCount - Estimated total # of rows by optimizer
      optimizerEstimatedCost - Estimated total cost by optimizer
      Returns:
      the scalar aggregation operation as a result set.
      Throws:
      StandardException - thrown when unable to create the result set
    • getDistinctScalarAggregateResultSet

      NoPutResultSet getDistinctScalarAggregateResultSet(NoPutResultSet source, boolean isInSortedOrder, int aggregateItem, int orderingItem, int rowAllocator, int rowSize, int resultSetNumber, boolean singleInputRow, double optimizerEstimatedRowCount, double optimizerEstimatedCost) throws StandardException
      A DistinctScalarAggregateResultSet computes scalar aggregates when at least one of them is a distinct aggregate. It will compute the aggregates when open.
      Parameters:
      source - the result set from which to take rows to be filtered by this operation.
      isInSortedOrder - true if the source result set is in sorted order
      aggregateItem - entry in preparedStatement's savedObjects for aggregates
      orderingItem - entry in preparedStatement's savedObjects for order
      rowAllocator - a reference to a saved object that generates rows of the right size and shape for the source
      rowSize - the size of the row that is allocated by rowAllocator. size should be the maximum size of the sum of all the datatypes. user type are necessarily approximated
      resultSetNumber - The resultSetNumber for the ResultSet
      singleInputRow - Whether we know we have a single input row or not
      optimizerEstimatedRowCount - Estimated total # of rows by optimizer
      optimizerEstimatedCost - Estimated total cost by optimizer
      Returns:
      the scalar aggregation operation as a result set.
      Throws:
      StandardException - thrown when unable to create the result set
    • getGroupedAggregateResultSet

      NoPutResultSet getGroupedAggregateResultSet(NoPutResultSet source, boolean isInSortedOrder, int aggregateItem, int orderingItem, int rowAllocator, int rowSize, int resultSetNumber, double optimizerEstimatedRowCount, double optimizerEstimatedCost, boolean isRollup) throws StandardException
      A GroupedAggregateResultSet computes non-distinct grouped aggregates. It will compute the aggregates when open.
      Parameters:
      source - the result set from which to take rows to be filtered by this operation.
      isInSortedOrder - true if the source result set is in sorted order
      aggregateItem - entry in preparedStatement's savedObjects for aggregates
      orderingItem - Ignored to allow same signature as getDistinctScalarAggregateResultSet
      rowAllocator - a reference to a saved object that generates rows of the right size and shape for the source
      rowSize - Ignored to allow same signature as getDistinctScalarAggregateResultSet
      resultSetNumber - The resultSetNumber for the ResultSet
      optimizerEstimatedRowCount - Estimated total # of rows by optimizer
      optimizerEstimatedCost - Estimated total cost by optimizer
      isRollup - true if this is a GROUP BY ROLLUP()
      Returns:
      the scalar aggregation operation as a result set.
      Throws:
      StandardException - thrown when unable to create the result set
    • getDistinctGroupedAggregateResultSet

      NoPutResultSet getDistinctGroupedAggregateResultSet(NoPutResultSet source, boolean isInSortedOrder, int aggregateItem, int orderingItem, int rowAllocator, int rowSize, int resultSetNumber, double optimizerEstimatedRowCount, double optimizerEstimatedCost, boolean isRollup) throws StandardException
      A DistinctGroupedAggregateResultSet computes scalar aggregates when at least one of them is a distinct aggregate. It will compute the aggregates when open.
      Parameters:
      source - the result set from which to take rows to be filtered by this operation.
      isInSortedOrder - true if the source result set is in sorted order
      aggregateItem - entry in preparedStatement's savedObjects for aggregates
      orderingItem - entry in preparedStatement's savedObjects for order
      rowAllocator - a reference to a saved object that generates rows of the right size and shape for the source
      rowSize - the size of the row that is allocated by rowAllocator. size should be the maximum size of the sum of all the datatypes. user type are necessarily approximated
      resultSetNumber - The resultSetNumber for the ResultSet
      optimizerEstimatedRowCount - Estimated total # of rows by optimizer
      optimizerEstimatedCost - Estimated total cost by optimizer
      isRollup - true if this is a GROUP BY ROLLUP()
      Returns:
      the scalar aggregation operation as a result set.
      Throws:
      StandardException - thrown when unable to create the result set
    • getAnyResultSet

      NoPutResultSet getAnyResultSet(NoPutResultSet source, GeneratedMethod emptyRowFun, int resultSetNumber, int subqueryNumber, int pointOfAttachment, double optimizerEstimatedRowCount, double optimizerEstimatedCost) throws StandardException
      An any result set iterates over its source, returning a row with all columns set to nulls if the source returns no rows.
      Parameters:
      source - the result set from which to take rows to be filtered by this operation.
      emptyRowFun - a reference to a method in the activation that is called if the source returns no rows
      resultSetNumber - The resultSetNumber for the ResultSet
      subqueryNumber - The subquery number for this subquery.
      pointOfAttachment - The point of attachment for this subquery.
      optimizerEstimatedRowCount - Estimated total # of rows by optimizer
      optimizerEstimatedCost - Estimated total cost by optimizer
      Returns:
      the any operation as a result set.
      Throws:
      StandardException - thrown when unable to create the result set
    • getOnceResultSet

      NoPutResultSet getOnceResultSet(NoPutResultSet source, GeneratedMethod emptyRowFun, int cardinalityCheck, int resultSetNumber, int subqueryNumber, int pointOfAttachment, double optimizerEstimatedRowCount, double optimizerEstimatedCost) throws StandardException
      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.
      Parameters:
      source - the result set from which to take rows to be filtered by this operation.
      emptyRowFun - a reference to a method in the activation that is called if the source returns no rows
      cardinalityCheck - The type of cardinality check, if any that is required
      resultSetNumber - The resultSetNumber for the ResultSet
      subqueryNumber - The subquery number for this subquery.
      pointOfAttachment - The point of attachment for this subquery.
      optimizerEstimatedRowCount - Estimated total # of rows by optimizer
      optimizerEstimatedCost - Estimated total cost by optimizer
      Returns:
      the once operation as a result set.
      Throws:
      StandardException - thrown when unable to create the result set
    • getRowResultSet

      NoPutResultSet getRowResultSet(Activation activation, GeneratedMethod row, boolean canCacheRow, int resultSetNumber, double optimizerEstimatedRowCount, double optimizerEstimatedCost) throws StandardException
      A row result set forms a result set on a single, known row value. It is used to turn constant rows into result sets for use in the result set paradigm. The row can be constructed when it is requested from the result set.
      Parameters:
      activation - the activation for this result set, against which the row operation is performed to create the result set.
      row - a reference to a method in the activation that creates the expected row. ExecRow row() throws StandardException;
      canCacheRow - True if execution can cache the input row after it has gotten it. If the input row is constructed soley of constants or parameters, it is ok to cache this row rather than recreating it each time it is requested.
      resultSetNumber - The resultSetNumber for the ResultSet
      optimizerEstimatedRowCount - Estimated total # of rows by optimizer
      optimizerEstimatedCost - Estimated total cost by optimizer
      Returns:
      the row as a result set.
      Throws:
      StandardException - thrown when unable to create the result set
    • getVTIResultSet

      NoPutResultSet getVTIResultSet(Activation activation, int row, int resultSetNumber, GeneratedMethod constructor, 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, String vtiSchema, String vtiName) throws StandardException
      A VTI result set wraps a user supplied result set.
      Parameters:
      activation - the activation for this result set, against which the row operation is performed to create the result set.
      row - a reference to a saved object that creates the expected row.
      resultSetNumber - The resultSetNumber for the ResultSet
      constructor - The GeneratedMethod for the user's constructor
      javaClassName - The java class name for the VTI
      erdNumber - int for referenced column BitSet (so it can be turned back into an object)
      version2 - Whether or not VTI is a version 2 VTI.
      isTarget - Whether or not VTI is a target VTI.
      optimizerEstimatedRowCount - Estimated total # of rows by optimizer
      optimizerEstimatedCost - Estimated total cost by optimizer
      isDerbyStyleTableFunction - True if this is a Derby-style table function
      returnTypeNumber - Which saved object contains the return type (a multi-set) serialized as a byte array
      vtiProjectionNumber - Which saved object contains the projection for a RestrictedVTI
      vtiRestrictionNumber - Which saved object contains the restriction for a RestrictedVTI
      vtiSchema - Name of the schema holding the table function.
      vtiName - Name of the table function.
      Returns:
      the row as a result set.
      Throws:
      StandardException - thrown when unable to create the result set
    • getHashScanResultSet

      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, String tableName, String userSuppliedOptimizerOverrides, String indexName, boolean isConstraint, boolean forUpdate, int colRefItem, int indexColItem, int lockMode, boolean tableLocked, int isolationLevel, double optimizerEstimatedRowCount, double optimizerEstimatedCost) throws StandardException
      A hash result set forms a result set on a hash table built on a scan of a table. The rows are put into the hash table on the 1st open.

      Parameters:
      activation - the activation for this result set, which provides the context for the row allocation operation.
      conglomId - the conglomerate of the table to be scanned.
      scociItem - The saved item for the static conglomerate info.
      resultRowTemplate - The saved item for result row template.
      resultSetNumber - The resultSetNumber for the ResultSet
      startKeyGetter - a reference to a method in the activation that gets the start key indexable row for the scan. Null means there is no start key. ExecIndexRow startKeyGetter() throws StandardException;
      startSearchOperator - The start search operator for opening the scan
      stopKeyGetter - a reference to a method in the activation that gets the stop key indexable row for the scan. Null means there is no stop key. ExecIndexRow stopKeyGetter() throws StandardException;
      stopSearchOperator - The stop search operator for opening the scan
      sameStartStopPosition - Re-use the startKeyGetter for the stopKeyGetter (Exact match search.)
      scanQualifiers - the array of Qualifiers for the scan. Null or an array length of zero means there are no qualifiers.
      nextQualifiers - the array of Qualifiers for the look up into the hash table.
      initialCapacity - The initialCapacity for the HashTable.
      loadFactor - The loadFactor for the HashTable.
      maxCapacity - The maximum size for the HashTable.
      hashKeyColumn - The 0-based column # for the hash key.
      tableName - The full name of the table
      userSuppliedOptimizerOverrides - Overrides specified by the user on the sql
      indexName - The name of the index, if one used to access table.
      isConstraint - If index, if used, is a backing index for a constraint.
      forUpdate - True means open for update
      colRefItem - An saved item for a bitSet of columns that are referenced in the underlying table. -1 if no item.
      lockMode - The lock granularity to use (see TransactionController in access)
      tableLocked - Whether or not the table is marked as using table locking (in sys.systables)
      isolationLevel - Isolation level (specified or not) to use on scans
      optimizerEstimatedRowCount - Estimated total # of rows by optimizer
      optimizerEstimatedCost - Estimated total cost by optimizer
      Returns:
      the table scan operation as a result set.
      Throws:
      StandardException - thrown when unable to create the result set
    • getDistinctScanResultSet

      NoPutResultSet getDistinctScanResultSet(Activation activation, long conglomId, int scociItem, int resultRowTemplate, int resultSetNumber, int hashKeyColumn, String tableName, String userSuppliedOptimizerOverrides, String indexName, boolean isConstraint, int colRefItem, int lockMode, boolean tableLocked, int isolationLevel, double optimizerEstimatedRowCount, double optimizerEstimatedCost) throws StandardException
      A distinct scan result set pushes duplicate elimination into the scan.

      Parameters:
      activation - the activation for this result set, which provides the context for the row allocation operation.
      conglomId - the conglomerate of the table to be scanned.
      scociItem - The saved item for the static conglomerate info.
      resultRowTemplate - The saved item for result row template.
      resultSetNumber - The resultSetNumber for the ResultSet
      hashKeyColumn - The 0-based column # for the hash key.
      tableName - The full name of the table
      userSuppliedOptimizerOverrides - Overrides specified by the user on the sql
      indexName - The name of the index, if one used to access table.
      isConstraint - If index, if used, is a backing index for a constraint.
      colRefItem - An saved item for a bitSet of columns that are referenced in the underlying table. -1 if no item.
      lockMode - The lock granularity to use (see TransactionController in access)
      tableLocked - Whether or not the table is marked as using table locking (in sys.systables)
      isolationLevel - Isolation level (specified or not) to use on scans
      optimizerEstimatedRowCount - Estimated total # of rows by optimizer
      optimizerEstimatedCost - Estimated total cost by optimizer
      Returns:
      the table scan operation as a result set.
      Throws:
      StandardException - thrown when unable to create the result set
    • getValidateCheckConstraintResultSet

      NoPutResultSet getValidateCheckConstraintResultSet(Activation activation, long conglomId, int scociItem, int resultRowTemplate, int resultSetNumber, GeneratedMethod startKeyGetter, int startSearchOperator, GeneratedMethod stopKeyGetter, int stopSearchOperator, boolean sameStartStopPosition, Qualifier[][] qualifiers, String tableName, String userSuppliedOptimizerOverrides, String indexName, boolean isConstraint, boolean forUpdate, int colRefItem, int indexColItem, int lockMode, boolean tableLocked, int isolationLevel, boolean oneRowScan, double optimizerEstimatedRowCount, double optimizerEstimatedCost) throws StandardException
      A table scan result set forms a result set on a scan of a table. The rows can be constructed as they are requested from the result set.

      This form of the table scan operation is simple, and is to be used when there are no predicates to be passed down to the scan to limit its scope on the target table.

      Parameters:
      activation - the activation for this result set, which provides the context for the row allocation operation.
      conglomId - the conglomerate of the table to be scanned.
      scociItem - The saved item for the static conglomerate info.
      resultRowTemplate - The saved item for result row template.
      resultSetNumber - The resultSetNumber for the ResultSet
      startKeyGetter - a reference to a method in the activation that gets the start key indexable row for the scan. Null means there is no start key. ExecIndexRow startKeyGetter() throws StandardException;
      startSearchOperator - The start search operator for opening the scan
      stopKeyGetter - a reference to a method in the activation that gets the stop key indexable row for the scan. Null means there is no stop key. ExecIndexRow stopKeyGetter() throws StandardException;
      stopSearchOperator - The stop search operator for opening the scan
      sameStartStopPosition - Re-use the startKeyGetter for the stopKeyGetter (Exact match search.)
      qualifiers - the array of Qualifiers for the scan. Null or an array length of zero means there are no qualifiers.
      tableName - The full name of the table
      userSuppliedOptimizerOverrides - Overrides specified by the user on the sql
      indexName - The name of the index, if one used to access table.
      isConstraint - If index, if used, is a backing index for a constraint.
      forUpdate - True means open for update
      colRefItem - An saved item for a bitSet of columns that are referenced in the underlying table. -1 if no item.
      lockMode - The lock granularity to use (see TransactionController in access)
      tableLocked - Whether or not the table is marked as using table locking (in sys.systables)
      isolationLevel - Isolation level (specified or not) to use on scans
      oneRowScan - Whether or not this is a 1 row scan.
      optimizerEstimatedRowCount - Estimated total # of rows by optimizer
      optimizerEstimatedCost - Estimated total cost by optimizer
      Returns:
      the table scan operation as a result set.
      Throws:
      StandardException - thrown when unable to create the result set
    • getTableScanResultSet

      NoPutResultSet getTableScanResultSet(Activation activation, long conglomId, int scociItem, int resultRowTemplate, int resultSetNumber, GeneratedMethod startKeyGetter, int startSearchOperator, GeneratedMethod stopKeyGetter, int stopSearchOperator, boolean sameStartStopPosition, Qualifier[][] qualifiers, String tableName, String userSuppliedOptimizerOverrides, String indexName, boolean isConstraint, boolean forUpdate, int colRefItem, int indexColItem, int lockMode, boolean tableLocked, int isolationLevel, boolean oneRowScan, double optimizerEstimatedRowCount, double optimizerEstimatedCost) throws StandardException
      Throws:
      StandardException
    • getBulkTableScanResultSet

      NoPutResultSet getBulkTableScanResultSet(Activation activation, long conglomId, int scociItem, int resultRowTemplate, int resultSetNumber, GeneratedMethod startKeyGetter, int startSearchOperator, GeneratedMethod stopKeyGetter, int stopSearchOperator, boolean sameStartStopPosition, Qualifier[][] qualifiers, String tableName, String userSuppliedOptimizerOverrides, 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) throws StandardException
      A table scan result set forms a result set on a scan of a table. The rows can be constructed as they are requested from the result set.

      This form of the table scan operation is simple, and is to be used when there are no predicates to be passed down to the scan to limit its scope on the target table.

      Parameters:
      activation - the activation for this result set, which provides the context for the row allocation operation.
      conglomId - the conglomerate of the table to be scanned.
      scociItem - The saved item for the static conglomerate info.
      resultRowTemplate - The saved item for result row template.
      resultSetNumber - The resultSetNumber for the ResultSet
      startKeyGetter - a reference to a method in the activation that gets the start key indexable row for the scan. Null means there is no start key. ExecIndexRow startKeyGetter() throws StandardException;
      startSearchOperator - The start search operator for opening the scan
      stopKeyGetter - a reference to a method in the activation that gets the stop key indexable row for the scan. Null means there is no stop key. ExecIndexRow stopKeyGetter() throws StandardException;
      stopSearchOperator - The stop search operator for opening the scan
      sameStartStopPosition - Re-use the startKeyGetter for the stopKeyGetter (Exact match search.)
      qualifiers - the array of Qualifiers for the scan. Null or an array length of zero means there are no qualifiers.
      tableName - The full name of the table
      userSuppliedOptimizerOverrides - Overrides specified by the user on the sql
      indexName - The name of the index, if one used to access table.
      isConstraint - If index, if used, is a backing index for a constraint.
      forUpdate - True means open for update
      colRefItem - An saved item for a bitSet of columns that are referenced in the underlying table. -1 if no item.
      lockMode - The lock granularity to use (see TransactionController in access)
      tableLocked - Whether or not the table is marked as using table locking (in sys.systables)
      isolationLevel - Isolation level (specified or not) to use on scans
      rowsPerRead - The number of rows to read per fetch.
      disableForHoldable - Whether or not bulk fetch should be disabled at runtime if the cursor is holdable.
      oneRowScan - Whether or not this is a 1 row scan.
      optimizerEstimatedRowCount - Estimated total # of rows by optimizer
      optimizerEstimatedCost - Estimated total cost by optimizer
      Returns:
      the table scan operation as a result set.
      Throws:
      StandardException - thrown when unable to create the result set
    • getMultiProbeTableScanResultSet

      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, String tableName, String userSuppliedOptimizerOverrides, String indexName, boolean isConstraint, boolean forUpdate, int colRefItem, int indexColItem, int lockMode, boolean tableLocked, int isolationLevel, boolean oneRowScan, double optimizerEstimatedRowCount, double optimizerEstimatedCost) throws StandardException
      A multi-probe result set, used for probing an index with one or more target values (probeValues) and returning the matching rows. This type of result set is useful for IN lists as it allows us to avoid scannning an entire, potentially very large, index for a mere handful of rows (DERBY-47). All arguments are the same as for TableScanResultSet, plus the following:
      Parameters:
      probeVals - List of values with which to probe the underlying table. Should not be null.
      sortRequired - Which type of sort we need for the values (ascending, descending, or none).
      Throws:
      StandardException
    • getIndexRowToBaseRowResultSet

      NoPutResultSet getIndexRowToBaseRowResultSet(long conglomId, int scoci, NoPutResultSet source, int resultRowAllocator, int resultSetNumber, String indexName, int heapColRefItem, int allColRefItem, int heapOnlyColRefItem, int indexColMapItem, GeneratedMethod restriction, boolean forUpdate, double optimizerEstimatedRowCount, double optimizerEstimatedCost, int baseColumnCount) throws StandardException
      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.

      Parameters:
      conglomId - Conglomerate # for the heap.
      scoci - The saved item for the static conglomerate info.
      source - the source result set, which is expected to provide rows from an index conglomerate
      resultRowAllocator - a reference to a method in the activation that creates a holder for the rows from the scan. ExecRow rowAllocator() throws StandardException;
      resultSetNumber - The resultSetNumber for the ResultSet
      indexName - The name of the index.
      heapColRefItem - A saved item for a bitImpl of columns that are referenced in the underlying heap. -1 if no item.
      allColRefItem - A saved item for a bitImpl of columns that are referenced in the underlying index and heap. -1 if no item.
      heapOnlyColRefItem - A saved item for a bitImpl of columns that are referenced in the underlying heap only. -1 if no item.
      indexColMapItem - A saved item for a ReferencedColumnsDescriptorImpl which tell which columms are coming from the index.
      restriction - The restriction, if any, to be applied to the base row
      forUpdate - True means to open for update
      optimizerEstimatedRowCount - Estimated total # of rows by optimizer
      optimizerEstimatedCost - Estimated total cost by optimizer
      baseColumnCount - Number of columns in the base table
      Returns:
      the index row to base row operation as a result set.
      Throws:
      StandardException - thrown when unable to create the result set
    • getWindowResultSet

      NoPutResultSet getWindowResultSet(Activation activation, NoPutResultSet source, int rowAllocator, int resultSetNumber, int erdNumber, GeneratedMethod restriction, double optimizerEstimatedRowCount, double optimizerEstimatedCost) throws StandardException
      A OLAP window on top of a regular result set. It is used to realize window functions.

      Parameters:
      activation - Activation
      source - The result set input to this result set.
      rowAllocator - A reference to a saved object that generates rows of the right size and shape for the source.
      resultSetNumber - The resultSetNumber for the ResultSet
      erdNumber - Int for ResultDescription (so it can be turned back into an object)
      restriction - The restriction, if any, to be applied to the base row
      optimizerEstimatedRowCount - Estimated total # of rows by optimizer
      optimizerEstimatedCost - Estimated total cost by optimizer
      Throws:
      StandardException
    • getNestedLoopJoinResultSet

      NoPutResultSet getNestedLoopJoinResultSet(NoPutResultSet leftResultSet, int leftNumCols, NoPutResultSet rightResultSet, int rightNumCols, GeneratedMethod joinClause, int resultSetNumber, boolean oneRowRightSide, boolean notExistsRightSide, double optimizerEstimatedRowCount, double optimizerEstimatedCost, String userSuppliedOptimizerOverrides) throws StandardException
      A nested loop left outer join result set forms a result set on top of 2 other result sets. The rows can be constructed as they are requested from the result set.

      This form of the nested loop join operation is simple, and is to be used when there are no join predicates to be passed down to the join to limit its scope on the right ResultSet.

      Parameters:
      leftResultSet - Outer ResultSet for join.
      leftNumCols - Number of columns in the leftResultSet
      rightResultSet - Inner ResultSet for join.
      rightNumCols - Number of columns in the rightResultSet
      joinClause - a reference to a method in the activation that is applied to the activation's "current row" field to determine whether the joinClause is satisfied or not. The signature of this method is Boolean joinClause() throws StandardException;
      resultSetNumber - The resultSetNumber for the ResultSet
      oneRowRightSide - boolean, whether or not the right side returns a single row. (No need to do 2nd next() if it does.)
      notExistsRightSide - boolean, whether or not the right side resides a NOT EXISTS base table
      optimizerEstimatedRowCount - Estimated total # of rows by optimizer
      optimizerEstimatedCost - Estimated total cost by optimizer
      userSuppliedOptimizerOverrides - Overrides specified by the user on the sql
      Returns:
      the nested loop join operation as a result set.
      Throws:
      StandardException - thrown when unable to create the result set
    • getHashJoinResultSet

      NoPutResultSet getHashJoinResultSet(NoPutResultSet leftResultSet, int leftNumCols, NoPutResultSet rightResultSet, int rightNumCols, GeneratedMethod joinClause, int resultSetNumber, boolean oneRowRightSide, boolean notExistsRightSide, double optimizerEstimatedRowCount, double optimizerEstimatedCost, String userSuppliedOptimizerOverrides) throws StandardException
      A hash join.
      Parameters:
      leftResultSet - Outer ResultSet for join.
      leftNumCols - Number of columns in the leftResultSet
      rightResultSet - Inner ResultSet for join.
      rightNumCols - Number of columns in the rightResultSet
      joinClause - a reference to a method in the activation that is applied to the activation's "current row" field to determine whether the joinClause is satisfied or not. The signature of this method is Boolean joinClause() throws StandardException;
      resultSetNumber - The resultSetNumber for the ResultSet
      oneRowRightSide - boolean, whether or not the right side returns a single row. (No need to do 2nd next() if it does.)
      notExistsRightSide - boolean, whether or not the right side resides a NOT EXISTS base table
      optimizerEstimatedRowCount - Estimated total # of rows by optimizer
      optimizerEstimatedCost - Estimated total cost by optimizer
      userSuppliedOptimizerOverrides - Overrides specified by the user on the sql
      Returns:
      the nested loop join operation as a result set.
      Throws:
      StandardException - thrown when unable to create the result set
    • getNestedLoopLeftOuterJoinResultSet

      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, String userSuppliedOptimizerOverrides) throws StandardException
      A nested loop join result set forms a result set on top of 2 other result sets. The rows can be constructed as they are requested from the result set.

      This form of the nested loop join operation is simple, and is to be used when there are no join predicates to be passed down to the join to limit its scope on the right ResultSet.

      Parameters:
      leftResultSet - Outer ResultSet for join.
      leftNumCols - Number of columns in the leftResultSet
      rightResultSet - Inner ResultSet for join.
      rightNumCols - Number of columns in the rightResultSet
      joinClause - a reference to a method in the activation that is applied to the activation's "current row" field to determine whether the joinClause is satisfied or not. The signature of this method is Boolean joinClause() throws StandardException;
      resultSetNumber - The resultSetNumber for the ResultSet
      emptyRowFun - a reference to a method in the activation that is called if the right child returns no rows
      wasRightOuterJoin - Whether or not this was originally a right outer join
      oneRowRightSide - boolean, whether or not the right side returns a single row. (No need to do 2nd next() if it does.)
      notExistsRightSide - boolean, whether or not the right side resides a NOT EXISTS base table
      optimizerEstimatedRowCount - Estimated total # of rows by optimizer
      optimizerEstimatedCost - Estimated total cost by optimizer
      userSuppliedOptimizerOverrides - Overrides specified by the user on the sql
      Returns:
      the nested loop join operation as a result set.
      Throws:
      StandardException - thrown when unable to create the result set
    • getHashLeftOuterJoinResultSet

      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, String userSuppliedOptimizerOverrides) throws StandardException
      A left outer join using a hash join.
      Parameters:
      leftResultSet - Outer ResultSet for join.
      leftNumCols - Number of columns in the leftResultSet
      rightResultSet - Inner ResultSet for join.
      rightNumCols - Number of columns in the rightResultSet
      joinClause - a reference to a method in the activation that is applied to the activation's "current row" field to determine whether the joinClause is satisfied or not. The signature of this method is Boolean joinClause() throws StandardException;
      resultSetNumber - The resultSetNumber for the ResultSet
      emptyRowFun - a reference to a method in the activation that is called if the right child returns no rows
      wasRightOuterJoin - Whether or not this was originally a right outer join
      oneRowRightSide - boolean, whether or not the right side returns a single row. (No need to do 2nd next() if it does.)
      notExistsRightSide - boolean, whether or not the right side resides a NOT EXISTS base table
      optimizerEstimatedRowCount - Estimated total # of rows by optimizer
      optimizerEstimatedCost - Estimated total cost by optimizer
      userSuppliedOptimizerOverrides - Overrides specified by the user on the sql
      Returns:
      the nested loop join operation as a result set.
      Throws:
      StandardException - thrown when unable to create the result set
    • getMaterializedResultSet

      NoPutResultSet getMaterializedResultSet(NoPutResultSet source, int resultSetNumber, double optimizerEstimatedRowCount, double optimizerEstimatedCost) throws StandardException
      A ResultSet which materializes the underlying ResultSet tree into a temp table on the 1st open. All subsequent "scans" of this ResultSet will return results from the temp table.
      Parameters:
      source - the result set input to this result set.
      resultSetNumber - The resultSetNumber for the ResultSet
      optimizerEstimatedRowCount - Estimated total # of rows by optimizer
      optimizerEstimatedCost - Estimated total cost by optimizer
      Returns:
      the materialization operation as a result set.
      Throws:
      StandardException - Thrown on failure
    • getScrollInsensitiveResultSet

      NoPutResultSet getScrollInsensitiveResultSet(NoPutResultSet source, Activation activation, int resultSetNumber, int sourceRowWidth, boolean scrollable, double optimizerEstimatedRowCount, double optimizerEstimatedCost) throws StandardException
      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.
      Parameters:
      source - the result set input to this result set.
      activation - the activation for this result set, which provides the context for normalization.
      resultSetNumber - The resultSetNumber for the ResultSet
      sourceRowWidth - The # of columns in the source row.
      optimizerEstimatedRowCount - Estimated total # of rows by optimizer
      optimizerEstimatedCost - Estimated total cost by optimizer
      Returns:
      the materialization operation as a result set.
      Throws:
      StandardException - Thrown on failure
    • getNormalizeResultSet

      NoPutResultSet getNormalizeResultSet(NoPutResultSet source, int resultSetNumber, int erdNumber, double optimizerEstimatedRowCount, double optimizerEstimatedCost, boolean forUpdate) throws StandardException
      REMIND: needs more description...
      Parameters:
      source - the result set input to this result set.
      resultSetNumber - The resultSetNumber for the ResultSet
      erdNumber - int for ResultDescription (so it can be turned back into an object)
      optimizerEstimatedRowCount - Estimated total # of rows by optimizer
      optimizerEstimatedCost - Estimated total cost by optimizer
      Returns:
      the normalization operation as a result set.
      Throws:
      StandardException - Thrown on failure
    • getCurrentOfResultSet

      NoPutResultSet getCurrentOfResultSet(String cursorName, Activation activation, int resultSetNumber)
      A current of result set forms a result set on the current row of an open cursor. It is used to perform positioned operations such as positioned update and delete, using the result set paradigm.
      Parameters:
      cursorName - the name of the cursor providing the row.
      resultSetNumber - The resultSetNumber for the ResultSet
    • getUnionResultSet

      NoPutResultSet getUnionResultSet(NoPutResultSet source1, NoPutResultSet source2, int resultSetNumber, double optimizerEstimatedRowCount, double optimizerEstimatedCost) throws StandardException
      The Union interface is used to evaluate the union (all) of two ResultSets. (Any duplicate elimination is performed above this ResultSet.) Forms a ResultSet returning the union of the rows in two source ResultSets. The column types in source1 and source2 are assumed to be the same.
      Parameters:
      source1 - The first ResultSet whose rows go into the union
      source2 - The second ResultSet whose rows go into the union
      resultSetNumber - The resultSetNumber for the ResultSet
      optimizerEstimatedRowCount - Estimated total # of rows by optimizer
      optimizerEstimatedCost - Estimated total cost by optimizer
      Returns:
      A ResultSet from which the caller can get the union of the two source ResultSets.
      Throws:
      StandardException - Thrown on failure
    • getSetOpResultSet

      NoPutResultSet getSetOpResultSet(NoPutResultSet leftSource, NoPutResultSet rightSource, Activation activation, int resultSetNumber, long optimizerEstimatedRowCount, double optimizerEstimatedCost, int opType, boolean all, int intermediateOrderByColumnsSavedObject, int intermediateOrderByDirectionSavedObject, int intermediateOrderByNullsLowSavedObject) throws StandardException
      The SetOpResultSet is used to implement an INTERSECT or EXCEPT operation. It selects rows from two ordered input result sets.
      Parameters:
      leftSource - The result set that implements the left input
      rightSource - The result set that implements the right input
      activation - the activation for this result set
      resultSetNumber -
      optimizerEstimatedRowCount -
      optimizerEstimatedCost -
      opType - IntersectOrExceptNode.INTERSECT_OP or EXCEPT_OP
      all - true if the operation is an INTERSECT ALL or an EXCEPT ALL, false if the operation is an INTERSECT DISCTINCT or an EXCEPT DISCTINCT
      intermediateOrderByColumnsSavedObject - The saved object index for the array of order by columns for the ordering of the left and right sources. That is, both the left and right sources have an order by clause of the form ORDER BY intermediateOrderByColumns[0],intermediateOrderByColumns[1],...
      intermediateOrderByDirectionSavedObject - The saved object index for the array of source order by directions. That is, the ordering of the i'th order by column in the input is ascending if intermediateOrderByDirection[i] is 1, descending if intermediateOrderByDirection[i] is -1.
      Returns:
      A ResultSet from which the caller can get the INTERSECT or EXCEPT
      Throws:
      StandardException - Thrown on failure
    • getLastIndexKeyResultSet

      NoPutResultSet getLastIndexKeyResultSet(Activation activation, int resultSetNumber, int resultRowTemplate, long conglomId, String tableName, String userSuppliedOptimizerOverrides, String indexName, int colRefItem, int lockMode, boolean tableLocked, int isolationLevel, double optimizerEstimatedRowCount, double optimizerEstimatedCost) throws StandardException
      A last index key result set returns the last row from the index in question. It is used as an ajunct to max().
      Parameters:
      activation - the activation for this result set, which provides the context for the row allocation operation.
      resultSetNumber - The resultSetNumber for the ResultSet
      resultRowTemplate - The saved item for result row template
      conglomId - the conglomerate of the table to be scanned.
      tableName - The full name of the table
      userSuppliedOptimizerOverrides - Overrides specified by the user on the sql
      indexName - The name of the index, if one used to access table.
      colRefItem - An saved item for a bitSet of columns that are referenced in the underlying table. -1 if no item.
      lockMode - The lock granularity to use (see TransactionController in access)
      tableLocked - Whether or not the table is marked as using table locking (in sys.systables)
      isolationLevel - Isolation level (specified or not) to use on scans
      optimizerEstimatedRowCount - Estimated total # of rows by optimizer
      optimizerEstimatedCost - Estimated total cost by optimizer
      Returns:
      the scan operation as a result set.
      Throws:
      StandardException - thrown when unable to create the result set
    • getRaDependentTableScanResultSet

      NoPutResultSet getRaDependentTableScanResultSet(Activation activation, long conglomId, int scociItem, int resultRowTemplate, int resultSetNumber, GeneratedMethod startKeyGetter, int startSearchOperator, GeneratedMethod stopKeyGetter, int stopSearchOperator, boolean sameStartStopPosition, Qualifier[][] qualifiers, String tableName, String userSuppliedOptimizerOverrides, String indexName, boolean isConstraint, boolean forUpdate, int colRefItem, int indexColItem, int lockMode, boolean tableLocked, int isolationLevel, boolean oneRowScan, double optimizerEstimatedRowCount, double optimizerEstimatedCost, String parentResultSetId, long fkIndexConglomId, int fkColArrayItem, int rltItem) throws StandardException
      A Dependent table scan result set forms a result set on a scan of a dependent table for the rows that got materialized on the scan of its parent table and if the row being deleted on parent table has a reference in the dependent table.
      Parameters:
      activation - the activation for this result set, which provides the context for the row allocation operation.
      conglomId - the conglomerate of the table to be scanned.
      scociItem - The saved item for the static conglomerate info.
      resultRowTemplate - The saved item for result row template.
      resultSetNumber - The resultSetNumber for the ResultSet
      startKeyGetter - a reference to a method in the activation that gets the start key indexable row for the scan. Null means there is no start key. ExecIndexRow startKeyGetter() throws StandardException;
      startSearchOperator - The start search operator for opening the scan
      stopKeyGetter - a reference to a method in the activation that gets the stop key indexable row for the scan. Null means there is no stop key. ExecIndexRow stopKeyGetter() throws StandardException;
      stopSearchOperator - The stop search operator for opening the scan
      sameStartStopPosition - Re-use the startKeyGetter for the stopKeyGetter (Exact match search.)
      qualifiers - the array of Qualifiers for the scan. Null or an array length of zero means there are no qualifiers.
      tableName - The full name of the table
      userSuppliedOptimizerOverrides - Overrides specified by the user on the sql
      indexName - The name of the index, if one used to access table.
      isConstraint - If index, if used, is a backing index for a constraint.
      forUpdate - True means open for update
      colRefItem - An saved item for a bitSet of columns that are referenced in the underlying table. -1 if no item.
      lockMode - The lock granularity to use (see TransactionController in access)
      tableLocked - Whether or not the table is marked as using table locking (in sys.systables)
      isolationLevel - Isolation level (specified or not) to use on scans
      oneRowScan - Whether or not this is a 1 row scan.
      optimizerEstimatedRowCount - Estimated total # of rows by optimizer
      optimizerEstimatedCost - Estimated total cost by optimizer
      parentResultSetId - Id to access the materialized temporary result set from the reference stored in the activation.
      fkIndexConglomId - foreign key index conglomerate id.
      fkColArrayItem - saved column array object that matches the foreign key index columns and the resultset from the parent table.
      rltItem - row location template
      Returns:
      the table scan operation as a result set.
      Throws:
      StandardException - thrown when unable to create the result set
    • getRowCountResultSet

      NoPutResultSet getRowCountResultSet(NoPutResultSet source, Activation activation, int resultSetNumber, GeneratedMethod offsetMethod, GeneratedMethod fetchFirstMethod, boolean hasJDBClimitClause, double optimizerEstimatedRowCount, double optimizerEstimatedCost) throws StandardException
      This result sets implements the filtering needed by and . It is only ever generated if at least one of the two clauses is present.
      Parameters:
      source - The source result set being filtered
      activation - The activation for this result set, which provides the context for the row allocation operation
      resultSetNumber - The resultSetNumber for the ResultSet
      offsetMethod - The OFFSET parameter was specified
      fetchFirstMethod - The FETCH FIRST/NEXT parameter was specified
      hasJDBClimitClause - True if the offset/fetchFirst clauses were added by JDBC LIMIT escape syntax
      optimizerEstimatedRowCount - Estimated total # of rows by optimizer
      optimizerEstimatedCost - Estimated total cost by optimizer
      Throws:
      StandardException - Standard error policy