org.jboss.dna.graph.query.optimize
Class RewriteAsRangeCriteria

java.lang.Object
  extended by org.jboss.dna.graph.query.optimize.RewriteAsRangeCriteria
All Implemented Interfaces:
OptimizerRule

@Immutable
public class RewriteAsRangeCriteria
extends Object
implements OptimizerRule

An optimizer rule that rewrites two AND-ed Constraints that constraint a dynamic operand to a range of values as a single Between constraint. This rule also collapses and removes any constraints that are unnecessary because other constraints are more restrictive or because they cancel out other constraints.


Field Summary
static RewriteAsRangeCriteria INSTANCE
           
 
Constructor Summary
RewriteAsRangeCriteria()
           
 
Method Summary
 PlanNode execute(QueryContext context, PlanNode plan, LinkedList<OptimizerRule> ruleStack)
          Optimize the supplied plan using the supplied context, hints, and yet-to-be-run rules.
 String toString()
          
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

INSTANCE

public static final RewriteAsRangeCriteria INSTANCE
Constructor Detail

RewriteAsRangeCriteria

public RewriteAsRangeCriteria()
Method Detail

execute

public PlanNode execute(QueryContext context,
                        PlanNode plan,
                        LinkedList<OptimizerRule> ruleStack)
Optimize the supplied plan using the supplied context, hints, and yet-to-be-run rules.

Specified by:
execute in interface OptimizerRule
Parameters:
context - the context in which the query is being optimized; never null
plan - the plan to be optimized; never null
ruleStack - the stack of rules that will be run after this rule; never null
Returns:
the optimized plan; never null
See Also:
OptimizerRule.execute(org.jboss.dna.graph.query.QueryContext, org.jboss.dna.graph.query.plan.PlanNode, java.util.LinkedList)

toString

public String toString()

Overrides:
toString in class Object
See Also:
Object.toString()


Copyright © 2008-2010 JBoss, a division of Red Hat. All Rights Reserved.