|
|||||||||
| 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.HashTableResultSet
class HashTableResultSet
Builds a hash table on the underlying result set tree.
| Field Summary | |
|---|---|
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
|
| Fields inherited from class org.apache.derby.impl.sql.execute.NoPutResultSetImpl |
|---|
checkNullCols, clonedExecRow, cncLen, resultSetNumber, targetResultSet |
| Fields inherited from class org.apache.derby.impl.sql.execute.BasicNoPutResultSetImpl |
|---|
activation, 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 | |
|---|---|
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)
|
|
| Method Summary | |
|---|---|
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()
|
| Methods inherited from class org.apache.derby.impl.sql.execute.NoPutResultSetImpl |
|---|
clearCurrentRow, clearOrderableCache, closeRowSource, getCursorName, getResultDescription, getValidColumns, 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, finish, getAbsoluteRow, getActivation, getAutoGeneratedKeysResultset, getBeginExecutionTimestamp, getCursorName, getEndExecutionTimestamp, getExecuteTime, getFirstRow, getLastRow, getNextRow, getPreviousRow, getRelativeRow, getResultDescription, getRowNumber, getSubqueryTrackingArray, getWarnings, isClosed, modifiedRowCount, open, returnsRows, setAfterLastRow, setBeforeFirstRow |
| Field Detail |
|---|
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
| Constructor Detail |
|---|
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| Method Detail |
|---|
public void openCore()
throws StandardException
openCore in interface NoPutResultSetStandardException - thrown if cursor finished.
public void reopenCore()
throws StandardException
reopenCore in interface NoPutResultSetreopenCore in class BasicNoPutResultSetImplStandardException - 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 NoPutResultSetgetNextRowCore in class BasicNoPutResultSetImplStandardException - thrown on failure.
StandardException - ResultSetNotOpen thrown if not yet open.NoPutResultSet.getNextRowCore()public 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 void close()
throws StandardException
close in interface ResultSetclose in class NoPutResultSetImplStandardException - thrown on error
public RowLocation getRowLocation()
throws StandardException
getRowLocation in interface CursorResultSetStandardException - thrown on failure.CursorResultSet
public ExecRow getCurrentRow()
throws StandardException
getCurrentRow in interface CursorResultSetStandardException - thrown on failure.CursorResultSet
private ExecRow doProjection(ExecRow sourceRow)
throws StandardException
sourceRow - The source row.
StandardException - thrown on failure.
public DataValueDescriptor[] getNextRowFromRowSource()
throws StandardException
RowSourceA 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 RowSourcegetNextRowFromRowSource in class NoPutResultSetImplStandardException - on errorRowSource.getNextRowFromRowSource()public boolean isForUpdate()
isForUpdate in interface NoPutResultSetisForUpdate in class NoPutResultSetImpl
|
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 | ||||||||