| Modifier and Type | Field and Description |
|---|---|
| private long[] | |
| private long | |
| private DataValueDescriptor[] | |
| private RowLocationRetRowSource |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| private DataValueDescriptor[] | |
| public void | closeRowSource()
Implements org. closeRowSource tells the RowSource that it will no longer need to return any rows and it can release any resource it may have. |
| public long[] | Returns: an array of unique values.return the array of cardinalities that are kept internally. |
| public DataValueDescriptor[] | getNextRowFromRowSource()
Implements org. Gets next row from the row source and update the count of unique values that are returned. |
| public long | Returns: total rows seen from the row source.get the number of rows seen in the row source thus far. |
| public FormatableBitSet | getValidColumns()
Implements org. getValidColumns describes the DataValueDescriptor[] returned by all calls to the getNextRowFromRowSource() call. |
| public void | |
| public boolean | needsRowLocation()
Implements org. needsRowLocation returns true iff this the row source expects the drainer of the row source to call rowLocation after getting a row from getNextRowFromRowSource. |
| public boolean | |
| public boolean | needsToClone()
Implements org. 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. |
| public void | offendingRowLocation(RowLocation rl, long containdId)
Implements org.
|
| public void | rowLocation(RowLocation rl)
Implements org. 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. |
| cardinality | back to summary |
|---|---|
| private long[] cardinality | |
| numRows | back to summary |
|---|---|
| private long numRows | |
| prevKey | back to summary |
|---|---|
| private DataValueDescriptor[] prevKey | |
| rowSource | back to summary |
|---|---|
| private RowLocationRetRowSource rowSource | |
| CardinalityCounter | back to summary |
|---|---|
| public CardinalityCounter(RowLocationRetRowSource rowSource) | |
| clone | back to summary |
|---|---|
| private DataValueDescriptor[] clone(DataValueDescriptor[] clonee) | |
| closeRowSource | back to summary |
|---|---|
| public void closeRowSource() Implements org. Doc from org. closeRowSource tells the RowSource that it will no longer need to return any rows and it can release any resource it may have. Subsequent call to any method on the RowSource will result in undefined behavior. A closed rowSource can be closed again. | |
| getCardinality | back to summary |
|---|---|
| public long[] getCardinality() return the array of cardinalities that are kept internally. One value for each leading key; i.e c1, (c1,c2), (c1,c2,c3) etc.
| |
| getNextRowFromRowSource | back to summary |
|---|---|
| public DataValueDescriptor[] getNextRowFromRowSource() throws StandardException Implements org. Gets next row from the row source and update the count of unique values that are returned.
| |
| getRowCount | back to summary |
|---|---|
| public long getRowCount() get the number of rows seen in the row source thus far.
| |
| getValidColumns | back to summary |
|---|---|
| public FormatableBitSet getValidColumns() Implements org. Doc from org. getValidColumns describes the DataValueDescriptor[] returned by all calls to the getNextRowFromRowSource() call. If getValidColumns returns null, the number of columns is given by the DataValueDescriptor.length where DataValueDescriptor[] is returned by the preceeding getNextRowFromRowSource() call. Column N maps to DataValueDescriptor[N], where column numbers start at zero. If getValidColumns return a non null validColumns FormatableBitSet the number of columns is given by the number of bits set in validColumns. Column N is not in the partial row if validColumns.get(N) returns false. Column N is in the partial row if validColumns.get(N) returns true. If column N is in the partial row then it maps to DataValueDescriptor[M] where M is the count of calls to validColumns.get(i) that return true where i < N. If DataValueDescriptor.length is greater than the number of columns indicated by validColumns the extra entries are ignored. | |
| keepCount | back to summary |
|---|---|
| public void keepCount(DataValueDescriptor[] currentKey) throws StandardException | |
| needsRowLocation | back to summary |
|---|---|
| public boolean needsRowLocation() Implements org. Doc from org. needsRowLocation returns true iff this the row source expects the drainer of the row source to call rowLocation after getting a row from getNextRowFromRowSource.
| |
| needsRowLocationForDeferredCheckConstraints | back to summary |
|---|---|
| public boolean needsRowLocationForDeferredCheckConstraints() Implements org. | |
| needsToClone | back to summary |
|---|---|
| public boolean needsToClone() Implements org. Doc from org. 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. This call must always return the same for all rows in a RowSource (ie. the caller will call this once per scan from a RowSource and assume the behavior is true for all rows in the RowSource).
| |
| offendingRowLocation | back to summary |
|---|---|
| public void offendingRowLocation(RowLocation rl, long containdId) throws StandardException Implements org. | |
| rowLocation | back to summary |
|---|---|
| public void rowLocation(RowLocation rl) throws StandardException Implements org. Doc from org. 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. This interface is for the purpose of
loading a base table with index. In that case, the indices can be
built at the same time the base table is laid down once the row
location of the base row is known. This is an example pseudo code on
how this call is expected to be used:
boolean needsRL = rowSource.needsRowLocation();
DataValueDescriptor[] row;
while((row = rowSource.getNextRowFromRowSource()) != null)
{
RowLocation rl = heapConglomerate.insertRow(row);
if (needsRL)
rowSource.rowLocation(rl);
}
NeedsRowLocation and rowLocation will ONLY be called by a drainer of the row source which CAN return a row location. Drainer of row source which cannot return rowLocation will guarantee to not call either callbacks. Conversely, if NeedsRowLocation is called and it returns true, then for every row return by getNextRowFromRowSource, a rowLocation callback must also be issued with the row location of the row. Implementor of both the source and the drain of the row source must be aware of this protocol. The RowLocation object is own by the caller of rowLocation, in other words, the drainer of the RowSource. This is so that we don't need to new a row location for every row. If the Row Source wants to keep the row location, it needs to clone it (RowLocation is a ClonableObject).
| |