RowLocationRetRowSource, RowSourceclass CardinalityCounter extends java.lang.Object implements RowLocationRetRowSource
| Modifier and Type | Field | Description |
|---|---|---|
private long[] |
cardinality |
|
private long |
numRows |
|
private DataValueDescriptor[] |
prevKey |
|
private RowLocationRetRowSource |
rowSource |
| Constructor | Description |
|---|---|
CardinalityCounter(RowLocationRetRowSource rowSource) |
| Modifier and Type | Method | Description |
|---|---|---|
private DataValueDescriptor[] |
clone(DataValueDescriptor[] clonee) |
|
void |
closeRowSource() |
closeRowSource tells the RowSource that it will no longer need to
return any rows and it can release any resource it may have.
|
long[] |
getCardinality() |
return the array of cardinalities that are kept internally.
|
DataValueDescriptor[] |
getNextRowFromRowSource() |
Gets next row from the row source and update the count of unique values
that are returned.
|
long |
getRowCount() |
get the number of rows seen in the row source thus far.
|
FormatableBitSet |
getValidColumns() |
getValidColumns describes the DataValueDescriptor[] returned by all calls
to the getNextRowFromRowSource() call.
|
void |
keepCount(DataValueDescriptor[] currentKey) |
|
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.
|
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.
|
private RowLocationRetRowSource rowSource
private DataValueDescriptor[] prevKey
private long[] cardinality
private long numRows
public CardinalityCounter(RowLocationRetRowSource rowSource)
public boolean needsRowLocation()
RowLocationRetRowSourceneedsRowLocation in interface RowLocationRetRowSourceRowLocationRetRowSource.needsRowLocation()public boolean needsRowLocationForDeferredCheckConstraints()
needsRowLocationForDeferredCheckConstraints in interface RowLocationRetRowSourcepublic void offendingRowLocation(RowLocation rl, long containdId) throws StandardException
offendingRowLocation in interface RowLocationRetRowSourceStandardExceptionpublic void rowLocation(RowLocation rl) throws StandardException
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 RowLocationRetRowSourceStandardException - on errorRowLocationRetRowSource.rowLocation(org.apache.derby.iapi.types.RowLocation)public DataValueDescriptor[] getNextRowFromRowSource() throws StandardException
getNextRowFromRowSource in interface RowSourceStandardException - Standard Derby Error PolicyRowSource.getNextRowFromRowSource()public boolean needsToClone()
RowSourceneedsToClone in interface RowSourceRowSource.needsToClone()public FormatableBitSet getValidColumns()
RowSourcegetValidColumns in interface RowSourceRowSource.getValidColumns()public void closeRowSource()
RowSourcecloseRowSource in interface RowSourceRowSource.closeRowSource()private DataValueDescriptor[] clone(DataValueDescriptor[] clonee)
public void keepCount(DataValueDescriptor[] currentKey) throws StandardException
StandardExceptionpublic long[] getCardinality()
public long getRowCount()
Apache Derby V10.14 Internals - Copyright © 2004,2018 The Apache Software Foundation. All Rights Reserved.