Class NestedLoopLeftOuterJoinResultSet
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
org.apache.derby.impl.sql.execute.NestedLoopLeftOuterJoinResultSet
- All Implemented Interfaces:
CursorResultSet, NoPutResultSet, ResultSet, RowLocationRetRowSource, RowSource
- Direct Known Subclasses:
HashLeftOuterJoinResultSet
Takes 2 NoPutResultSets and a join filter and returns
the join's rows satisfying the filter as a result set
plus the rows from the left joined with a null row from
the right when there is no matching row in the right
result set.
-
Nested Class Summary
Nested classes/interfaces inherited from class BasicNoPutResultSetImpl
BasicNoPutResultSetImpl.FieldComparator -
Field Summary
FieldsModifier and TypeFieldDescriptionintprotected GeneratedMethodprivate booleanprivate booleanprivate ExecRowprivate booleanFields inherited from class JoinResultSet
isRightOpen, leftNumCols, leftResultSet, leftRow, mergedRow, notExistsRightSide, oneRowRightSide, restriction, restrictionTime, rightNumCols, rightResultSet, rightRow, rowsReturned, rowsSeenLeft, rowsSeenRight, userSuppliedOptimizerOverridesFields inherited from class NoPutResultSetImpl
checkNullCols, clonedExecRow, cncLen, resultSetNumber, targetResultSetFields inherited from class BasicNoPutResultSetImpl
activation, beginTime, closeTime, compactRow, constructorTime, currentRow, endExecutionTime, finished, isOpen, isTopResultSet, nextTime, numOpens, openTime, optimizerEstimatedCost, optimizerEstimatedRowCount, resultDescription, rowsFiltered, rowsSeen, startExecutionTime, subqueryTrackingArrayFields inherited from interface NoPutResultSet
ABSOLUTE, FIRST, LAST, NEXT, PREVIOUS, RELATIVE, TEMPORARY_RESULT_SET_NUMBERFields inherited from interface ResultSet
CURRENT_RESULTSET_ONLY, ENTIRE_RESULTSET_TREE, ISAFTERLAST, ISBEFOREFIRST, ISFIRST, ISLAST -
Constructor Summary
ConstructorsConstructorDescriptionNestedLoopLeftOuterJoinResultSet(NoPutResultSet leftResultSet, int leftNumCols, NoPutResultSet rightResultSet, int rightNumCols, Activation activation, GeneratedMethod restriction, int resultSetNumber, GeneratedMethod emptyRowFun, boolean wasRightOuterJoin, boolean oneRowRightSide, boolean notExistsRightSide, double optimizerEstimatedRowCount, double optimizerEstimatedCost, String userSuppliedOptimizerOverrides) -
Method Summary
Modifier and TypeMethodDescription(package private) voidClear any private state that changes during scans.protected voidgetMergedRow(ExecRow leftRow, ExecRow rightRow) Return the requested values computed from the next row (if any) for which the restriction evaluates to true.Methods inherited from class NestedLoopJoinResultSet
close, getTimeSpentMethods inherited from class JoinResultSet
closeRight, finish, getCurrentRow, getRowLocation, openCore, openRight, reopenCoreMethods inherited from class 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, updateRowMethods inherited from class 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, toXMLMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface 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 Details
-
emptyRowFun
-
wasRightOuterJoin
private boolean wasRightOuterJoin -
matchRight
private boolean matchRight -
returnedEmptyRight
private boolean returnedEmptyRight -
rightEmptyRow
-
emptyRightRowsReturned
public int emptyRightRowsReturned
-
-
Constructor Details
-
NestedLoopLeftOuterJoinResultSet
NestedLoopLeftOuterJoinResultSet(NoPutResultSet leftResultSet, int leftNumCols, NoPutResultSet rightResultSet, int rightNumCols, Activation activation, GeneratedMethod restriction, int resultSetNumber, GeneratedMethod emptyRowFun, boolean wasRightOuterJoin, boolean oneRowRightSide, boolean notExistsRightSide, double optimizerEstimatedRowCount, double optimizerEstimatedCost, String userSuppliedOptimizerOverrides)
-
-
Method Details
-
getNextRowCore
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- Overrides:
getNextRowCorein classNestedLoopJoinResultSet- Returns:
- the next row in the join result
- Throws:
StandardException- Thrown on errorStandardException- ResultSetNotOpen thrown if closed- See Also:
-
getMergedRow
- Throws:
StandardException
-
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 classNestedLoopJoinResultSet
-