public static class StatsRulesProcFactory.FilterStatsRule extends StatsRulesProcFactory.DefaultStatsRule implements NodeProcessor
- Alternate formula T(S) = T(R) (V(R,A) - 1) / V(R,A)
- Alternate formula T(S) = T(R) * ( 1 - ( 1 - m1/T(R) ) * ( 1 - m2/T(R) ))
where, m1 is the number of tuples that satisfy condition1 and m2 is the number of tuples that satisfy condition2
Worst case: If no column statistics are available, then evaluation of predicate expression will assume worst case (i.e; half the input rows) for each of predicate expression.
For more information, refer 'Estimating The Cost Of Operations' chapter in "Database Systems: The Complete Book" by Garcia-Molina et. al.
| Constructor and Description |
|---|
StatsRulesProcFactory.FilterStatsRule() |
public StatsRulesProcFactory.FilterStatsRule()
public Object process(Node nd, Stack<Node> stack, NodeProcessorCtx procCtx, Object... nodeOutputs) throws SemanticException
NodeProcessorprocess in interface NodeProcessorprocess in class StatsRulesProcFactory.DefaultStatsRulend - operator to processprocCtx - operator processor contextnodeOutputs - A variable argument list of outputs from other nodes in the walkSemanticExceptionCopyright © 2015 The Apache Software Foundation. All rights reserved.