java.lang.Cloneable
, CursorResultSet
, NoPutResultSet
, ResultSet
, RowLocationRetRowSource
, RowSource
class MultiProbeTableScanResultSet extends TableScanResultSet implements CursorResultSet
BasicNoPutResultSetImpl.FieldComparator
Modifier and Type | Field | Description |
---|---|---|
protected DataValueDescriptor[] |
origProbeValues |
The values with which we will probe the table, as they were passed to
the constructor.
|
protected int |
probeValIndex |
0-based position of the next value to lookup w.r.t. the probe
values list.
|
protected DataValueDescriptor[] |
probeValues |
The values with which we will probe the table.
|
private boolean |
skipNextScan |
Tells whether or not we should skip the next attempt to (re)open the
scan controller.
|
private int |
sortRequired |
Indicator as to which type of sort we need: ASCENDING, DESCENDING,
or NONE (NONE is represented by "RowOrdering.DONTCARE" and is used
for cases where all necessary sorting occurred at compilation time).
|
activation, beginTime, closeTime, compactRow, constructorTime, currentRow, endExecutionTime, finished, isOpen, isTopResultSet, nextTime, numOpens, openTime, optimizerEstimatedCost, optimizerEstimatedRowCount, resultDescription, rowsFiltered, rowsSeen, startExecutionTime, subqueryTrackingArray
ABSOLUTE, FIRST, LAST, NEXT, PREVIOUS, RELATIVE, TEMPORARY_RESULT_SET_NUMBER
checkNullCols, clonedExecRow, cncLen, resultSetNumber, targetResultSet
CURRENT_RESULTSET_ONLY, ENTIRE_RESULTSET_TREE, ISAFTERLAST, ISBEFOREFIRST, ISFIRST, ISLAST
accessedCols, candidate, fetchRowLocations, indexName, isolationLevel, lockMode, resultRowBuilder, tableName
coarserLock, conglomId, currentRowIsValid, dcoci, firstScan, forUpdate, indexCols, isConstraint, isKeyed, nextDone, oneRowScan, past2FutureTbl, qualifiers, qualify, rowsPerRead, rowsThisScan, runTimeStatisticsOn, sameStartStopPosition, scanController, scanControllerOpened, scanRepositioned, scoci, startKeyGetter, startPosition, startPositionString, startSearchOperator, stopKeyGetter, stopPosition, stopPositionString, stopSearchOperator, userSuppliedOptimizerOverrides
Constructor | Description |
---|---|
MultiProbeTableScanResultSet(long conglomId,
StaticCompiledOpenConglomInfo scoci,
Activation activation,
int resultRowTemplate,
int resultSetNumber,
GeneratedMethod startKeyGetter,
int startSearchOperator,
GeneratedMethod stopKeyGetter,
int stopSearchOperator,
boolean sameStartStopPosition,
Qualifier[][] qualifiers,
DataValueDescriptor[] probingVals,
int sortRequired,
java.lang.String tableName,
java.lang.String userSuppliedOptimizerOverrides,
java.lang.String indexName,
boolean isConstraint,
boolean forUpdate,
int colRefItem,
int indexColItem,
int lockMode,
boolean tableLocked,
int isolationLevel,
boolean oneRowScan,
double optimizerEstimatedRowCount,
double optimizerEstimatedCost) |
Constructor.
|
Modifier and Type | Method | Description |
---|---|---|
void |
close() |
If the result set has been opened,
close the open scan.
|
private DataValueDescriptor |
getNextProbeValue() |
Return the next non-duplicate value from the probe list.
|
ExecRow |
getNextRowCore() |
Return the next row (if any) from the scan (if open).
|
(package private) void |
initStartAndStopKey() |
Initialize the start key and the stop key used in the scan.
|
private boolean |
moreInListVals() |
Figure out whether or not we can (re-)position the scan
controller based on the next value in probeValues.
|
void |
openCore() |
open a scan on the table. scan parameters are evaluated
at each open, so there is probably some way of altering
their values...
|
void |
reopenCore() |
Reopen a table scan.
|
private void |
reopenCore(boolean forNextProbe) |
There are two scenarios for which we reopen this kind of scan:
A - The first is for join processing.
|
protected void |
reopenScanController() |
Reopen the scan controller
|
protected boolean |
skipScan(ExecIndexRow startPosition,
ExecIndexRow stopPosition) |
Check if the scan should be skipped.
|
addWarning, attachStatementContext, checkCancellationFlag, checkRowPosition, childrenToXML, cleanUp, dumpTimeStats, finish, finishAndRTS, getAbsoluteRow, getActivation, getAutoGeneratedKeysResultset, getBeginExecutionTimestamp, getCompactRow, getCurrentTimeMillis, getElapsedMillis, getEndExecutionTimestamp, getEstimatedRowCount, getExecuteTime, getExecutionFactory, getFirstRow, getLanguageConnectionContext, getLastRow, getNextRow, getPointOfAttachment, getPreviousRow, getRelativeRow, getRowNumber, getSubqueryTrackingArray, getTransactionController, getWarnings, isClosed, isXplainOnlyMode, markAsTopResultSet, modifiedRowCount, open, recordConstructorTime, returnsRows, setAfterLastRow, setBeforeFirstRow, setCompactRow, setCompatRow, toXML
getCurrentRow, getRowLocation
clearCurrentRow, clearOrderableCache, closeRowSource, getCursorName, getNextRowFromRowSource, getResultDescription, getValidColumns, markRowAsDeleted, needsRowLocation, needsRowLocationForDeferredCheckConstraints, needsToClone, offendingRowLocation, printQualifiers, resultSetNumber, rowLocation, setCurrentRow, setHasDeferrableChecks, setNeedsRowLocation, setTargetResultSet, skipRow, unpackHashValue, updateRow
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addWarning, checkRowPosition, cleanUp, clearCurrentRow, finish, getAbsoluteRow, getActivation, getAutoGeneratedKeysResultset, getBeginExecutionTimestamp, getCursorName, getEndExecutionTimestamp, getExecuteTime, getFirstRow, getLastRow, getNextRow, getPreviousRow, getRelativeRow, getResultDescription, getRowNumber, getSubqueryTrackingArray, getTimeSpent, getWarnings, isClosed, modifiedRowCount, open, returnsRows, setAfterLastRow, setBeforeFirstRow, toXML
getScanIsolationLevel, initIsolationLevel, setRowLocationsState, toXML
canGetInstantaneousLocks, clone, getCurrentRow, getRowLocation, getScanProperties, getTimeSpent, isForUpdate, loopControl, openScanController, positionScanAtRowLocation, printStartPosition, printStopPosition, requiresRelocking, setRowCountIfPossible
protected DataValueDescriptor[] probeValues
protected DataValueDescriptor[] origProbeValues
protected int probeValIndex
private int sortRequired
private boolean skipNextScan
true
it means that the previous call
to initStartAndStopKey()
did not find a new probe value, which
means that the probe list is exhausted and we shouldn't perform a scan.MultiProbeTableScanResultSet(long conglomId, StaticCompiledOpenConglomInfo scoci, Activation activation, int resultRowTemplate, int resultSetNumber, GeneratedMethod startKeyGetter, int startSearchOperator, GeneratedMethod stopKeyGetter, int stopSearchOperator, boolean sameStartStopPosition, Qualifier[][] qualifiers, DataValueDescriptor[] probingVals, int sortRequired, java.lang.String tableName, java.lang.String userSuppliedOptimizerOverrides, java.lang.String indexName, boolean isConstraint, boolean forUpdate, int colRefItem, int indexColItem, int lockMode, boolean tableLocked, int isolationLevel, boolean oneRowScan, double optimizerEstimatedRowCount, double optimizerEstimatedCost) throws StandardException
StandardException
- thrown on failure to openResultSetFactory.getMultiProbeTableScanResultSet(org.apache.derby.iapi.sql.Activation, long, int, int, int, org.apache.derby.iapi.services.loader.GeneratedMethod, int, org.apache.derby.iapi.services.loader.GeneratedMethod, int, boolean, org.apache.derby.iapi.store.access.Qualifier[][], org.apache.derby.iapi.types.DataValueDescriptor[], int, java.lang.String, java.lang.String, java.lang.String, boolean, boolean, int, int, int, boolean, int, boolean, double, double)
public void openCore() throws StandardException
TableScanResultSet
openCore
in interface NoPutResultSet
openCore
in class TableScanResultSet
StandardException
- thrown on failure to openNoPutResultSet.openCore()
public void reopenCore() throws StandardException
TableScanResultSet
reopenCore
in interface NoPutResultSet
reopenCore
in class TableScanResultSet
StandardException
- thrown on failure to openNoPutResultSet.reopenCore()
private void reopenCore(boolean forNextProbe) throws StandardException
StandardException
protected void reopenScanController() throws StandardException
reopenScanController
in class TableScanResultSet
StandardException
- thrown on failure to openvoid initStartAndStopKey() throws StandardException
true
when the method returns to prevent a new scan from being reopened with
a missing or incorrect probe value.initStartAndStopKey
in class TableScanResultSet
StandardException
protected boolean skipScan(ExecIndexRow startPosition, ExecIndexRow stopPosition) throws StandardException
initStartAndStopKey()
exhausted the probe list, or (2) the scan
should return no results because of nulls in the start key or stop key.
See NoPutResultSetImpl.skipScan(ExecIndexRow,ExecIndexRow)
for
details about (2).skipScan
in class NoPutResultSetImpl
startPosition
- the key on which to start the scanstopPosition
- the key on which to stop the scantrue
if scan should be skipped, false
otherwiseStandardException
public ExecRow getNextRowCore() throws StandardException
getNextRowCore
in interface NoPutResultSet
getNextRowCore
in class TableScanResultSet
StandardException
- thrown on failure to get next rowNoPutResultSet.getNextRowCore()
public void close() throws StandardException
TableScanResultSet
close
in interface ResultSet
close
in class TableScanResultSet
StandardException
- on errorResultSet.close()
private boolean moreInListVals()
private DataValueDescriptor getNextProbeValue()
Apache Derby V10.14 Internals - Copyright © 2004,2018 The Apache Software Foundation. All Rights Reserved.