com.metamatrix.query.optimizer.relational.rules
Class RuleCopyCriteria

java.lang.Object
  extended by com.metamatrix.query.optimizer.relational.rules.RuleCopyCriteria
All Implemented Interfaces:
OptimizerRule

public final class RuleCopyCriteria
extends java.lang.Object
implements OptimizerRule

For each join node this rule will find the set of criteria allowed to influence the join (the join criteria, and inner side criteria on non full outer joins) and builds new criteria based upon the equality relationships found. Equality relationships look like element symbol = expression regardless of whether they are from select or join criteria Upon successfully changing a multi group join criteria into another expression with fewer groups, the original criteria will be replace with the new criteria in the on clause. RulePushNonJoinCriteia and CopyCriteria will be run again after this rule if any new join criteria is created. This rule is not allowed to run exhaustively by the setting of the copied property on criteria nodes. It also will not discover all possible relationships, only those that can be discovered quickly.


Constructor Summary
RuleCopyCriteria()
           
 
Method Summary
 PlanNode execute(PlanNode plan, QueryMetadataInterface metadata, CapabilitiesFinder capFinder, RuleStack rules, AnalysisRecord analysisRecord, CommandContext context)
          Execute the rule as described in the class comments.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RuleCopyCriteria

public RuleCopyCriteria()
Method Detail

execute

public PlanNode execute(PlanNode plan,
                        QueryMetadataInterface metadata,
                        CapabilitiesFinder capFinder,
                        RuleStack rules,
                        AnalysisRecord analysisRecord,
                        CommandContext context)
                 throws QueryPlannerException,
                        MetaMatrixComponentException
Execute the rule as described in the class comments.

Specified by:
execute in interface OptimizerRule
Parameters:
plan - Incoming query plan, may be modified during method and may be returned from method
metadata - Metadata source
rules - Rules from optimizer rule stack, may be manipulated during method
Returns:
Updated query plan if rule fired, else original query plan
Throws:
QueryPlannerException
MetaMatrixComponentException

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2009. All Rights Reserved.