class HashTableResultSet extends NoPutResultSetImpl implements CursorResultSet
BasicNoPutResultSetImpl.FieldComparator
Modifier and Type | Field and Description |
---|---|
private java.util.List |
entryVector |
private int |
entryVectorSize |
private boolean |
firstIntoHashtable |
private boolean |
firstNext |
private boolean |
hashTableBuilt |
int |
hashtableSize |
private BackingStoreHashtable |
ht |
private int |
initialCapacity |
int[] |
keyColumns |
private float |
loadFactor |
private ExecRow |
mappedResultRow |
private long |
maxInMemoryRowCount |
private ExecRow |
nextCandidate |
Qualifier[][] |
nextQualifiers |
private int |
numFetchedOnNext |
private GeneratedMethod |
projection |
long |
projectionTime |
private int[] |
projectMapping |
private ExecRow |
projRow |
private boolean |
removeDuplicates |
long |
restrictionTime |
boolean |
reuseResult |
private boolean |
runTimeStatsOn |
java.util.Properties |
scanProperties |
GeneratedMethod |
singleTableRestriction |
private boolean |
skipNullKeyColumns |
NoPutResultSet |
source |
checkNullCols, clonedExecRow, cncLen, resultSetNumber, targetResultSet
activation, beginTime, closeTime, compactRow, constructorTime, currentRow, endExecutionTime, finished, isOpen, isTopResultSet, nextTime, numOpens, openTime, optimizerEstimatedCost, optimizerEstimatedRowCount, resultDescription, rowsFiltered, rowsSeen, startExecutionTime, subqueryTrackingArray
CURRENT_RESULTSET_ONLY, ENTIRE_RESULTSET_TREE, ISAFTERLAST, ISBEFOREFIRST, ISFIRST, ISLAST
ABSOLUTE, FIRST, LAST, NEXT, PREVIOUS, RELATIVE, TEMPORARY_RESULT_SET_NUMBER
Constructor and Description |
---|
HashTableResultSet(NoPutResultSet s,
Activation a,
GeneratedMethod str,
Qualifier[][] nextQualifiers,
GeneratedMethod p,
int resultSetNumber,
int mapRefItem,
boolean reuseResult,
int keyColItem,
boolean removeDuplicates,
long maxInMemoryRowCount,
int initialCapacity,
float loadFactor,
boolean skipNullKeyColumns,
double optimizerEstimatedRowCount,
double optimizerEstimatedCost) |
Modifier and Type | Method and Description |
---|---|
void |
close()
If the result set has been opened,
close the open scan.
|
private ExecRow |
doProjection(ExecRow sourceRow)
Do the projection against the source row.
|
ExecRow |
getCurrentRow()
Gets last row returned.
|
ExecRow |
getNextRowCore()
Return the requested values computed
from the next row (if any) for which
the restriction evaluates to true.
|
DataValueDescriptor[] |
getNextRowFromRowSource()
Get the next row as an array of column objects.
|
RowLocation |
getRowLocation()
Gets information from its source.
|
long |
getTimeSpent(int type)
Return the total amount of time spent in this ResultSet
|
boolean |
isForUpdate()
Is this ResultSet or it's source result set for update
|
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 scan on the table. scan parameters are evaluated
at each open, so there is probably some way of altering
their values...
|
private void |
resetProbeVariables() |
clearCurrentRow, clearOrderableCache, closeRowSource, getCursorName, getResultDescription, getValidColumns, markRowAsDeleted, needsRowLocation, needsRowLocationForDeferredCheckConstraints, needsToClone, offendingRowLocation, positionScanAtRowLocation, printQualifiers, resultSetNumber, rowLocation, setCurrentRow, setHasDeferrableChecks, setNeedsRowLocation, setTargetResultSet, skipRow, skipScan, unpackHashValue, updateRow
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, getScanIsolationLevel, getSubqueryTrackingArray, getTransactionController, getWarnings, isClosed, isXplainOnlyMode, markAsTopResultSet, modifiedRowCount, open, recordConstructorTime, requiresRelocking, returnsRows, setAfterLastRow, setBeforeFirstRow, setCompactRow, setCompatRow, toXML, toXML
clone, 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, getWarnings, isClosed, modifiedRowCount, open, returnsRows, setAfterLastRow, setBeforeFirstRow, toXML
public long restrictionTime
public long projectionTime
public int hashtableSize
public java.util.Properties scanProperties
public NoPutResultSet source
public GeneratedMethod singleTableRestriction
public Qualifier[][] nextQualifiers
private GeneratedMethod projection
private int[] projectMapping
private boolean runTimeStatsOn
private ExecRow mappedResultRow
public boolean reuseResult
public int[] keyColumns
private boolean removeDuplicates
private long maxInMemoryRowCount
private int initialCapacity
private float loadFactor
private boolean skipNullKeyColumns
private boolean firstNext
private int numFetchedOnNext
private int entryVectorSize
private java.util.List entryVector
private boolean hashTableBuilt
private boolean firstIntoHashtable
private ExecRow nextCandidate
private ExecRow projRow
private BackingStoreHashtable ht
HashTableResultSet(NoPutResultSet s, Activation a, GeneratedMethod str, Qualifier[][] nextQualifiers, GeneratedMethod p, int resultSetNumber, int mapRefItem, boolean reuseResult, int keyColItem, boolean removeDuplicates, long maxInMemoryRowCount, int initialCapacity, float loadFactor, boolean skipNullKeyColumns, double optimizerEstimatedRowCount, double optimizerEstimatedCost) throws StandardException
StandardException
public void openCore() throws StandardException
openCore
in interface NoPutResultSet
StandardException
- thrown if cursor finished.public void reopenCore() throws StandardException
reopenCore
in interface NoPutResultSet
reopenCore
in class BasicNoPutResultSetImpl
StandardException
- thrown if cursor finished.NoPutResultSet.openCore()
private void resetProbeVariables() throws StandardException
StandardException
public ExecRow getNextRowCore() throws StandardException
restriction and projection parameters are evaluated for each row.
getNextRowCore
in interface NoPutResultSet
getNextRowCore
in class BasicNoPutResultSetImpl
StandardException
- thrown on failure.StandardException
- ResultSetNotOpen thrown if not yet open.NoPutResultSet.getNextRowCore()
public 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 void close() throws StandardException
close
in interface ResultSet
close
in class NoPutResultSetImpl
StandardException
- thrown on errorpublic RowLocation getRowLocation() throws StandardException
getRowLocation
in interface CursorResultSet
StandardException
- thrown on failure.CursorResultSet
public ExecRow getCurrentRow() throws StandardException
getCurrentRow
in interface CursorResultSet
StandardException
- thrown on failure.CursorResultSet
private ExecRow doProjection(ExecRow sourceRow) throws StandardException
sourceRow
- The source row.StandardException
- thrown on failure.public DataValueDescriptor[] getNextRowFromRowSource() throws StandardException
RowSource
A null column can be specified by leaving the object null, or indicated by returning a non-null getValidColumns. On streaming columns, it can be indicated by returning a non-null get FieldStates.
If RowSource.needToClone() is true then the returned row (the DataValueDescriptor[]) is guaranteed not to be modified by drainer of the RowSource (except that the input stream will be read, of course) and drainer will keep no reference to it before making the subsequent nextRow call. So it is safe to return the same DataValueDescriptor[] in subsequent nextRow calls if that is desirable for performance reasons.
If RowSource.needToClone() is false then the returned row (the DataValueDescriptor[]) may be be modified by drainer of the RowSource, and the drainer may keep a reference to it after making the subsequent nextRow call. In this case the client should severe all references to the row after returning it from getNextRowFromRowSource().
getNextRowFromRowSource
in interface RowSource
getNextRowFromRowSource
in class NoPutResultSetImpl
StandardException
- on errorRowSource.getNextRowFromRowSource()
public boolean isForUpdate()
isForUpdate
in interface NoPutResultSet
isForUpdate
in class NoPutResultSetImpl
Apache Derby V10.13 Internals - Copyright © 2004,2016 The Apache Software Foundation. All Rights Reserved.