public class MergeScanRowSource extends MergeScan implements ScanControllerRowSource
mergeRuns, openScans, sortBuffer
current, hold, sort, tran
GE, GT, NA
Constructor and Description |
---|
MergeScanRowSource(MergeSort sort,
TransactionManager tran,
SortBuffer sortBuffer,
java.util.Vector<java.lang.Long> mergeRuns,
SortObserver sortObserver,
boolean hold) |
Modifier and Type | Method and Description |
---|---|
void |
closeRowSource()
Close the row source - implemented by MergeScan already
|
DataValueDescriptor[] |
getNextRowFromRowSource()
Get the next row as an array of column objects.
|
FormatableBitSet |
getValidColumns()
All columns are always set from a sorter
|
boolean |
needsRowLocation()
needsRowLocation returns true iff this the row source expects the
drainer of the row source to call rowLocation after getting a row from
getNextRowFromRowSource.
|
boolean |
needsRowLocationForDeferredCheckConstraints() |
boolean |
needsToClone()
Does the caller of getNextRowFromRowSource() need to clone the row
in order to keep a reference to the row past the
getNextRowFromRowSource() call which returned the row.
|
boolean |
next()
Move to the next position in the scan.
|
void |
offendingRowLocation(RowLocation rl,
long containdId) |
void |
rowLocation(RowLocation rl)
rowLocation is a callback for the drainer of the row source to return
the rowLocation of the current row, i.e, the row that is being returned
by getNextRowFromRowSource.
|
close, closeForEndTransaction, init, mergeARow
fetch, fetchNext, fetchWithoutQualify
delete, didNotQualify, doesCurrentPositionQualify, fetchLocation, fetchNextGroup, fetchNextGroup, fetchSet, getAllScanInfo, getEstimatedRowCount, getScanInfo, isCurrentPositionDeleted, isHeldAfterCommit, isKeyed, isTableLocked, newRowLocationTemplate, positionAtRowLocation, reopenScan, reopenScanByRowLocation, replace, setEstimatedRowCount
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
delete, didNotQualify, doesCurrentPositionQualify, fetch, fetchLocation, fetchNext, fetchWithoutQualify, isCurrentPositionDeleted, isHeldAfterCommit, positionAtRowLocation, replace
close, getScanInfo, isKeyed, isTableLocked, newRowLocationTemplate, reopenScan, reopenScanByRowLocation
getEstimatedRowCount, setEstimatedRowCount
MergeScanRowSource(MergeSort sort, TransactionManager tran, SortBuffer sortBuffer, java.util.Vector<java.lang.Long> mergeRuns, SortObserver sortObserver, boolean hold)
public boolean next() throws StandardException
MergeScan
next
in interface GroupFetchScanController
next
in interface ScanController
next
in class MergeScan
StandardException
- Standard exception policy.ScanController.next()
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
StandardException
- Standard Derby Error Policypublic boolean needsRowLocation()
RowLocationRetRowSource
needsRowLocation
in interface RowLocationRetRowSource
RowLocationRetRowSource.needsRowLocation()
public boolean needsRowLocationForDeferredCheckConstraints()
needsRowLocationForDeferredCheckConstraints
in interface RowLocationRetRowSource
public boolean needsToClone()
RowSource
needsToClone
in interface RowSource
RowSource.needsToClone()
public void rowLocation(RowLocation rl)
RowLocationRetRowSource
boolean needsRL = rowSource.needsRowLocation(); DataValueDescriptor[] row; while((row = rowSource.getNextRowFromRowSource()) != null) { RowLocation rl = heapConglomerate.insertRow(row); if (needsRL) rowSource.rowLocation(rl); }
rowLocation
in interface RowLocationRetRowSource
RowLocationRetRowSource.rowLocation(org.apache.derby.iapi.types.RowLocation)
public void offendingRowLocation(RowLocation rl, long containdId) throws StandardException
offendingRowLocation
in interface RowLocationRetRowSource
StandardException
public FormatableBitSet getValidColumns()
getValidColumns
in interface RowSource
public void closeRowSource()
closeRowSource
in interface RowSource
Apache Derby V10.13 Internals - Copyright © 2004,2016 The Apache Software Foundation. All Rights Reserved.