Class NestedLoopJoinResultSet
- java.lang.Object
-
- org.apache.derby.impl.sql.execute.BasicNoPutResultSetImpl
-
- org.apache.derby.impl.sql.execute.NoPutResultSetImpl
-
- org.apache.derby.impl.sql.execute.JoinResultSet
-
- org.apache.derby.impl.sql.execute.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.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.derby.impl.sql.execute.BasicNoPutResultSetImpl
BasicNoPutResultSetImpl.FieldComparator
-
-
Field Summary
Fields Modifier and Type Field Description private booleanreturnedRowMatchingRightSideprivate ExecRowrightTemplate-
Fields inherited from class org.apache.derby.impl.sql.execute.JoinResultSet
isRightOpen, leftNumCols, leftResultSet, leftRow, mergedRow, notExistsRightSide, oneRowRightSide, restriction, restrictionTime, rightNumCols, rightResultSet, rightRow, rowsReturned, rowsSeenLeft, rowsSeenRight, userSuppliedOptimizerOverrides
-
Fields inherited from class org.apache.derby.impl.sql.execute.NoPutResultSetImpl
checkNullCols, clonedExecRow, cncLen, resultSetNumber, targetResultSet
-
Fields inherited from class org.apache.derby.impl.sql.execute.BasicNoPutResultSetImpl
activation, beginTime, closeTime, compactRow, constructorTime, currentRow, endExecutionTime, finished, isOpen, isTopResultSet, nextTime, numOpens, openTime, optimizerEstimatedCost, optimizerEstimatedRowCount, resultDescription, rowsFiltered, rowsSeen, startExecutionTime, subqueryTrackingArray
-
Fields inherited from interface org.apache.derby.iapi.sql.execute.NoPutResultSet
ABSOLUTE, FIRST, LAST, NEXT, PREVIOUS, RELATIVE, TEMPORARY_RESULT_SET_NUMBER
-
Fields inherited from interface org.apache.derby.iapi.sql.ResultSet
CURRENT_RESULTSET_ONLY, ENTIRE_RESULTSET_TREE, ISAFTERLAST, ISBEFOREFIRST, ISFIRST, ISLAST
-
-
Constructor Summary
Constructors Constructor Description NestedLoopJoinResultSet(NoPutResultSet leftResultSet, int leftNumCols, NoPutResultSet rightResultSet, int rightNumCols, Activation activation, GeneratedMethod restriction, int resultSetNumber, boolean oneRowRightSide, boolean notExistsRightSide, double optimizerEstimatedRowCount, double optimizerEstimatedCost, java.lang.String userSuppliedOptimizerOverrides)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) voidclearScanState()Clear any private state that changes during scans.voidclose()If the result set has been opened, close the open scan.ExecRowgetNextRowCore()Return the requested values computed from the next row (if any) for which the restriction evaluates to true.longgetTimeSpent(int type)Return the total amount of time spent in this ResultSet-
Methods inherited from class org.apache.derby.impl.sql.execute.JoinResultSet
closeRight, finish, getCurrentRow, getRowLocation, openCore, openRight, reopenCore
-
Methods inherited from class org.apache.derby.impl.sql.execute.NoPutResultSetImpl
clearCurrentRow, clearOrderableCache, closeRowSource, getCursorName, getNextRowFromRowSource, getResultDescription, getValidColumns, isForUpdate, markRowAsDeleted, needsRowLocation, needsRowLocationForDeferredCheckConstraints, needsToClone, offendingRowLocation, positionScanAtRowLocation, printQualifiers, resultSetNumber, rowLocation, setCurrentRow, setHasDeferrableChecks, setNeedsRowLocation, setTargetResultSet, skipRow, skipScan, unpackHashValue, updateRow
-
Methods inherited from class org.apache.derby.impl.sql.execute.BasicNoPutResultSetImpl
addWarning, attachStatementContext, checkCancellationFlag, checkRowPosition, childrenToXML, cleanUp, dumpTimeStats, finishAndRTS, getAbsoluteRow, getActivation, getAutoGeneratedKeysResultset, getBeginExecutionTimestamp, getCompactRow, getCurrentTimeMillis, getElapsedMillis, getEndExecutionTimestamp, getEstimatedRowCount, getExecuteTime, getExecutionFactory, getFirstRow, getLanguageConnectionContext, getLastRow, getNextRow, getPointOfAttachment, getPreviousRow, getRelativeRow, getRowNumber, getScanIsolationLevel, getSubqueryTrackingArray, getTransactionController, getWarnings, isClosed, isXplainOnlyMode, markAsTopResultSet, modifiedRowCount, open, recordConstructorTime, requiresRelocking, returnsRows, setAfterLastRow, setBeforeFirstRow, setCompactRow, setCompatRow, toXML, toXML
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.derby.iapi.sql.ResultSet
addWarning, checkRowPosition, cleanUp, clearCurrentRow, getAbsoluteRow, getActivation, getAutoGeneratedKeysResultset, getBeginExecutionTimestamp, getCursorName, getEndExecutionTimestamp, getExecuteTime, getFirstRow, getLastRow, getNextRow, getPreviousRow, getRelativeRow, getResultDescription, getRowNumber, getSubqueryTrackingArray, getWarnings, isClosed, modifiedRowCount, open, returnsRows, setAfterLastRow, setBeforeFirstRow, toXML
-
-
-
-
Field Detail
-
returnedRowMatchingRightSide
private boolean returnedRowMatchingRightSide
-
rightTemplate
private ExecRow rightTemplate
-
-
Constructor Detail
-
NestedLoopJoinResultSet
NestedLoopJoinResultSet(NoPutResultSet leftResultSet, int leftNumCols, NoPutResultSet rightResultSet, int rightNumCols, Activation activation, GeneratedMethod restriction, int resultSetNumber, boolean oneRowRightSide, boolean notExistsRightSide, double optimizerEstimatedRowCount, double optimizerEstimatedCost, java.lang.String userSuppliedOptimizerOverrides)
-
-
Method Detail
-
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:
clearScanStatein classJoinResultSet
-
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:
getNextRowCorein interfaceNoPutResultSet- Specified by:
getNextRowCorein classBasicNoPutResultSetImpl- Returns:
- the next row in the join result
- Throws:
StandardException- Thrown on errorStandardException- ResultSetNotOpen thrown if closed- See Also:
NoPutResultSet.getNextRowCore()
-
close
public void close() throws StandardExceptionIf the result set has been opened, close the open scan.- Specified by:
closein interfaceResultSet- Overrides:
closein classJoinResultSet- 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).
-
-