net.sf.farrago.catalog
Class FarragoColumnHistogram.HistogramBarCoverage
java.lang.Object
net.sf.farrago.catalog.FarragoColumnHistogram.HistogramBarCoverage
- Enclosing class:
- FarragoColumnHistogram
private static class FarragoColumnHistogram.HistogramBarCoverage
- extends Object
Describes which points and ranges lie on a histogram bar
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
entireBar
private boolean entireBar
cardinalityPoint
private int cardinalityPoint
cardinalityRanges
private int cardinalityRanges
selectivityPoints
private int selectivityPoints
selectivityRanges
private int selectivityRanges
FarragoColumnHistogram.HistogramBarCoverage
private FarragoColumnHistogram.HistogramBarCoverage()
addRange
protected static void addRange(List<FarragoColumnHistogram.HistogramBarCoverage> coverages,
FarragoColumnHistogram.HistogramRange range,
String minVal)
- Determines how a histogram range, possibly spanning several bars,
covers each histogram bar, and accumulates a running total of the
coverage.
- Parameters:
coverages
- set of coverages for each barrange
- histogram bar range to be tabulated
estimateFraction
protected Double estimateFraction(Double cardinality)
- Estimates what percentage of a bar is covered, based on the bar's
total cardinality.
- Parameters:
cardinality
- the expected cardinality of the bar
- Returns:
- an estimate from 0.0 to 1.0 representing a fraction of a bar,
or null if no reliable estimate can be made
estimateCardinality
protected Double estimateCardinality(Double cardinality)
- Estimates the cardinality of the column after applying a predicate.
- Parameters:
cardinality
- the expected cardinality of the bar
- Returns:
- an estimate of the cardinality of the column after applying
the predicate, or null if no reliable estimate can be made