org.eigenbase.stat
Interface RelStatColumnStatistics

All Known Implementing Classes:
FarragoColumnHistogram

public interface RelStatColumnStatistics

This interface provides results based on column statistics. It may be used to summarize the results of applying a predicate to a column of a relational expression. Alternatively, it may be used to summarize aspects of the entire column.

Version:
$Id: //open/dev/farrago/src/org/eigenbase/stat/RelStatColumnStatistics.java#7 $
Author:
John Pham

Method Summary
 Double getCardinality()
          Estimates the number of distinct values returned from a relational expression that satisfy a given condition.
 Double getSelectivity()
          Estimates the percentage of a relational expression's rows which satisfy a given condition.
 

Method Detail

getSelectivity

Double getSelectivity()
Estimates the percentage of a relational expression's rows which satisfy a given condition. This corresponds to the metadata query RelMetadataQuery.getSelectivity(org.eigenbase.rel.RelNode, org.eigenbase.rex.RexNode).

Returns:
an estimated percentage from 0.0 to 1.0 or null if no reliable estimate can be determined

getCardinality

Double getCardinality()
Estimates the number of distinct values returned from a relational expression that satisfy a given condition.

Returns:
an estimate of the distinct values of a predicate or null if no reliable estimate can be determined