|
|||||||||
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 int |
rightDuplicateCount
|
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 |
---|
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 int rightDuplicateCount
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 NoPutResultSet
StandardException
- thrown on failurepublic ExecRow getNextRowCore() throws StandardException
NoPutResultSet
restriction and projection parameters are evaluated for each row.
getNextRowCore
in interface NoPutResultSet
getNextRowCore
in class BasicNoPutResultSetImpl
StandardException
- 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
StandardException
public ExecRow getCurrentRow()
CursorResultSet
getCurrentRow
in interface CursorResultSet
public void close() throws StandardException
close
in interface ResultSet
close
in class NoPutResultSetImpl
StandardException
- thrown on errorpublic void finish() throws StandardException
ResultSet
finish
in interface ResultSet
finish
in class BasicNoPutResultSetImpl
StandardException
- on errorpublic long getTimeSpent(int type)
getTimeSpent
in interface ResultSet
type
- 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 CursorResultSet
StandardException
- thrown on failureCursorResultSet
public int getOpType()
SetOpResultSet
IntersectOrExceptNode.INTERSECT_OP
for
Intersect operation or IntersectOrExceptNode.EXCEPT_OP
for Except operationIntersectOrExceptNode
public int getResultSetNumber()
public NoPutResultSet getLeftSourceInput()
SetOpResultSet
SetOpResultSet
NoPutResultSet
public NoPutResultSet getRightSourceInput()
SetOpResultSet
SetOpResultSet
NoPutResultSet
public int getRowsSeenLeft()
public int getRowsSeenRight()
public int getRowsReturned()
|
Built on Thu 2010-12-23 20:49:13+0000, from revision ??? | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |