Class NestedLoopJoinResultSet

All Implemented Interfaces:
CursorResultSet, NoPutResultSet, ResultSet, RowLocationRetRowSource, RowSource
Direct Known Subclasses:
HashJoinResultSet, NestedLoopLeftOuterJoinResultSet

class NestedLoopJoinResultSet extends JoinResultSet
Takes 2 NoPutResultSets and a join filter and returns the join's rows satisfying the filter as a result set.
  • Field Details

    • returnedRowMatchingRightSide

      private boolean returnedRowMatchingRightSide
    • rightTemplate

      private ExecRow rightTemplate
  • Constructor Details

    • NestedLoopJoinResultSet

      NestedLoopJoinResultSet(NoPutResultSet leftResultSet, int leftNumCols, NoPutResultSet rightResultSet, int rightNumCols, Activation activation, GeneratedMethod restriction, int resultSetNumber, boolean oneRowRightSide, boolean notExistsRightSide, double optimizerEstimatedRowCount, double optimizerEstimatedCost, String userSuppliedOptimizerOverrides)
  • Method Details

    • clearScanState

      void clearScanState()
      Clear any private state that changes during scans. This includes things like the last row seen, etc. THis does not include immutable things that are typically set up in the constructor.

      This method is called on open()/close() and reopen()

      WARNING: this should be implemented in every sub class and it should always call super.clearScanState().

      Overrides:
      clearScanState in class JoinResultSet
    • getNextRowCore

      public ExecRow getNextRowCore() throws StandardException
      Return the requested values computed from the next row (if any) for which the restriction evaluates to true.

      restriction parameters are evaluated for each row.

      Specified by:
      getNextRowCore in interface NoPutResultSet
      Specified by:
      getNextRowCore in class BasicNoPutResultSetImpl
      Returns:
      the next row in the join result
      Throws:
      StandardException - Thrown on error
      StandardException - ResultSetNotOpen thrown if closed
      See Also:
    • close

      public void close() throws StandardException
      If the result set has been opened, close the open scan.
      Specified by:
      close in interface ResultSet
      Overrides:
      close in class JoinResultSet
      Throws:
      StandardException - thrown on error
    • getTimeSpent

      public long getTimeSpent(int type)
      Return the total amount of time spent in this ResultSet
      Parameters:
      type - CURRENT_RESULTSET_ONLY - time spent only in this ResultSet ENTIRE_RESULTSET_TREE - time spent in this ResultSet and below.
      Returns:
      long The total amount of time spent (in milliseconds).