org.apache.derby.impl.sql.execute
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
- public class NestedLoopLeftOuterJoinResultSet
- extends NestedLoopJoinResultSet
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.
Fields inherited from class org.apache.derby.impl.sql.execute.JoinResultSet |
activation, beginTime, checkGM, checkNullCols, clonedExecRow, closeCleanup, closeTime, cncLen, compactRow, constructorTime, currentRow, endExecutionTime, finished, heapConglomerate, indent, isOpen, isRightOpen, isTopResultSet, lcc, leftNumCols, leftResultSet, leftRow, mergedRow, nextTime, notExistsRightSide, numOpens, oneRowRightSide, openTime, optimizerEstimatedCost, optimizerEstimatedRowCount, restriction, restrictionTime, resultDescription, resultSetNumber, rightNumCols, rightResultSet, rightRow, rowsFiltered, rowsReturned, rowsSeen, rowsSeenLeft, rowsSeenRight, sourceDepth, startExecutionTime, subIndent, subqueryTrackingArray, targetResultSet |
Constructor Summary |
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,
GeneratedMethod closeCleanup)
|
Methods inherited from class org.apache.derby.impl.sql.execute.JoinResultSet |
addWarning, attachStatementContext, checkRowPosition, cleanUp, clearCurrentRow, clearOrderableCache, closeRight, closeRowSource, dumpTimeStats, finish, finishAndRTS, getAbsoluteRow, getAutoGeneratedKeysResultset, getBeginExecutionTimestamp, getCompactRow, getCurrentRow, getCurrentTimeMillis, getCursorName, getElapsedMillis, getEndExecutionTimestamp, getEstimatedRowCount, getExecuteTime, getExecutionFactory, getFirstRow, getLanguageConnectionContext, getLastRow, getNextRow, getNextRowFromRowSource, getPointOfAttachment, getPreviousRow, getRelativeRow, getResultDescription, getRowLocation, getRowNumber, getScanIsolationLevel, getSubqueryTrackingArray, getTransactionController, getValidColumns, getWarnings, isClosed, isForUpdate, markAsTopResultSet, modifiedRowCount, needsRowLocation, needsToClone, open, openCore, openRight, printQualifiers, reopenCore, requiresRelocking, resultSetNumber, returnsRows, rowLocation, setAfterLastRow, setBeforeFirstRow, setCheckConstraints, setCompactRow, setCompatRow, setCurrentRow, setHeapConglomerate, setNeedsRowLocation, setTargetResultSet, skipRow, skipScan |
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 |
checkRowPosition, cleanUp, getAbsoluteRow, getAutoGeneratedKeysResultset, getBeginExecutionTimestamp, getCursorName, getEndExecutionTimestamp, getExecuteTime, getFirstRow, getLastRow, getNextRow, getPreviousRow, getRelativeRow, getResultDescription, getRowNumber, getSubqueryTrackingArray, getWarnings, isClosed, modifiedRowCount, open, returnsRows, setAfterLastRow, setBeforeFirstRow |
emptyRowFun
protected GeneratedMethod emptyRowFun
wasRightOuterJoin
private boolean wasRightOuterJoin
matchRight
private boolean matchRight
returnedEmptyRight
private boolean returnedEmptyRight
rightEmptyRow
private ExecRow rightEmptyRow
emptyRightRowsReturned
public int emptyRightRowsReturned
NestedLoopLeftOuterJoinResultSet
public 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,
GeneratedMethod closeCleanup)
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
- Overrides:
getNextRowCore
in class NestedLoopJoinResultSet
- Returns:
- the next row in the join result
- Throws:
StandardException
- Thrown on error
StandardException
- ResultSetNotOpen thrown if closed
getMergedRow
protected void getMergedRow(ExecRow leftRow,
ExecRow rightRow)
throws StandardException
- 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:
clearScanState
in class NestedLoopJoinResultSet
Apache Derby V10.1 Engine Documentation - Copyright © 1997,2005 The Apache Software Foundation or its licensors, as applicable.