|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.derby.impl.sql.execute.BasicNoPutResultSetImpl
org.apache.derby.impl.sql.execute.NoPutResultSetImpl
org.apache.derby.impl.sql.execute.SetOpResultSet
class SetOpResultSet
Takes the result set produced by an ordered UNION ALL of two tagged result sets and produces the INTERSECT or EXCEPT of the two input result sets. This also projects out the tag, the last column of the input rows.
| Field Summary | |
|---|---|
private Activation |
activation
|
private boolean |
all
|
private int[] |
intermediateOrderByColumns
|
private int[] |
intermediateOrderByDirection
|
private boolean[] |
intermediateOrderByNullsLow
|
private ExecRow |
leftInputRow
|
private NoPutResultSet |
leftSource
|
private int |
opType
|
private DataValueDescriptor[] |
prevCols
|
private int |
resultSetNumber
|
private ExecRow |
rightInputRow
|
private NoPutResultSet |
rightSource
|
private int |
rowsReturned
|
private int |
rowsSeenLeft
|
private int |
rowsSeenRight
|
| Fields inherited from class org.apache.derby.impl.sql.execute.NoPutResultSetImpl |
|---|
checkNullCols, clonedExecRow, cncLen, targetResultSet |
| Fields inherited from class org.apache.derby.impl.sql.execute.BasicNoPutResultSetImpl |
|---|
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.ResultSet |
|---|
CURRENT_RESULTSET_ONLY, ENTIRE_RESULTSET_TREE, ISAFTERLAST, ISBEFOREFIRST, ISFIRST, ISLAST |
| Fields inherited from interface org.apache.derby.iapi.sql.execute.NoPutResultSet |
|---|
ABSOLUTE, FIRST, LAST, NEXT, PREVIOUS, RELATIVE |
| Constructor Summary | |
|---|---|
SetOpResultSet(NoPutResultSet leftSource,
NoPutResultSet rightSource,
Activation activation,
int resultSetNumber,
long optimizerEstimatedRowCount,
double optimizerEstimatedCost,
int opType,
boolean all,
int intermediateOrderByColumnsSavedObject,
int intermediateOrderByDirectionSavedObject,
int intermediateOrderByNullsLowSavedObject)
|
|
| Method Summary | |
|---|---|
private void |
advanceRightPastDuplicates(DataValueDescriptor[] leftColumns)
|
void |
close()
If the result set has been opened, close the currently open source. |
private int |
compare(DataValueDescriptor[] leftCols,
DataValueDescriptor[] rightCols)
|
void |
finish()
Tells the system that there will be no more access to any database information via this result set; in particular, no more calls to open(). |
ExecRow |
getCurrentRow()
Returns the current row of the result set. |
NoPutResultSet |
getLeftSourceInput()
Return the left source input of this SetOpResultSet |
ExecRow |
getNextRowCore()
Return the requested values computed from the next row (if any) for which the restriction evaluates to true. |
int |
getOpType()
Return the set operation of this SetOpResultSet |
int |
getResultSetNumber()
Return the result set number |
NoPutResultSet |
getRightSourceInput()
Return the right source input of this SetOpResultSet |
RowLocation |
getRowLocation()
Returns the row location of the current base table row of the cursor. |
int |
getRowsReturned()
Return the number of rows returned from the result set |
int |
getRowsSeenLeft()
Return the number of rows seen on the left source input |
int |
getRowsSeenRight()
Return the number of rows seen on the right source input |
long |
getTimeSpent(int type)
Return the total amount of time spent in this ResultSet |
private boolean |
isDuplicate(DataValueDescriptor[] curColumns)
|
void |
openCore()
open the first source. |
| Methods inherited from class org.apache.derby.impl.sql.execute.NoPutResultSetImpl |
|---|
clearCurrentRow, clearOrderableCache, closeRowSource, getCursorName, getNextRowFromRowSource, getResultDescription, getValidColumns, isForUpdate, markRowAsDeleted, needsRowLocation, needsToClone, positionScanAtRowLocation, printQualifiers, resultSetNumber, rowLocation, setCurrentRow, setNeedsRowLocation, setTargetResultSet, skipRow, skipScan, updateRow |
| 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 |
| Field Detail |
|---|
private final NoPutResultSet leftSource
private final NoPutResultSet rightSource
private final Activation activation
private final int opType
private final boolean all
private final int resultSetNumber
private DataValueDescriptor[] prevCols
private ExecRow leftInputRow
private ExecRow rightInputRow
private final int[] intermediateOrderByColumns
private final int[] intermediateOrderByDirection
private final boolean[] intermediateOrderByNullsLow
private int rowsSeenLeft
private int rowsSeenRight
private int rowsReturned
| Constructor Detail |
|---|
SetOpResultSet(NoPutResultSet leftSource,
NoPutResultSet rightSource,
Activation activation,
int resultSetNumber,
long optimizerEstimatedRowCount,
double optimizerEstimatedCost,
int opType,
boolean all,
int intermediateOrderByColumnsSavedObject,
int intermediateOrderByDirectionSavedObject,
int intermediateOrderByNullsLowSavedObject)
| Method Detail |
|---|
public void openCore()
throws StandardException
openCore in interface NoPutResultSetStandardException - thrown on failure
public ExecRow getNextRowCore()
throws StandardException
NoPutResultSetrestriction and projection parameters are evaluated for each row.
getNextRowCore in interface NoPutResultSetgetNextRowCore in class BasicNoPutResultSetImplStandardException - thrown on failureNoPutResultSet.getNextRowCore()
private void advanceRightPastDuplicates(DataValueDescriptor[] leftColumns)
throws StandardException
StandardException
private int compare(DataValueDescriptor[] leftCols,
DataValueDescriptor[] rightCols)
throws StandardException
StandardException
private boolean isDuplicate(DataValueDescriptor[] curColumns)
throws StandardException
StandardExceptionpublic ExecRow getCurrentRow()
CursorResultSet
getCurrentRow in interface CursorResultSet
public void close()
throws StandardException
close in interface ResultSetclose in class NoPutResultSetImplStandardException - thrown on error
public void finish()
throws StandardException
ResultSet
finish in interface ResultSetfinish in class BasicNoPutResultSetImplStandardException - on errorpublic long getTimeSpent(int type)
getTimeSpent in interface ResultSettype - CURRENT_RESULTSET_ONLY - time spent only in this ResultSet
ENTIRE_RESULTSET_TREE - time spent in this ResultSet and below.
public RowLocation getRowLocation()
throws StandardException
CursorResultSet
getRowLocation in interface CursorResultSetStandardException - thrown on failureCursorResultSetpublic int getOpType()
SetOpResultSet
IntersectOrExceptNode.INTERSECT_OP for
Intersect operation or IntersectOrExceptNode.EXCEPT_OP
for Except operationIntersectOrExceptNodepublic int getResultSetNumber()
public NoPutResultSet getLeftSourceInput()
SetOpResultSet
SetOpResultSetNoPutResultSetpublic NoPutResultSet getRightSourceInput()
SetOpResultSet
SetOpResultSetNoPutResultSetpublic int getRowsSeenLeft()
public int getRowsSeenRight()
public int getRowsReturned()
|
Built on Wed 2013-06-12 15:21:56+0000, from revision ??? | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||