Class RuleCopyCriteria
- java.lang.Object
-
- org.teiid.query.optimizer.relational.rules.RuleCopyCriteria
-
- All Implemented Interfaces:
OptimizerRule
public final class RuleCopyCriteria extends 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
Constructors Constructor Description RuleCopyCriteria()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PlanNode
execute(PlanNode plan, QueryMetadataInterface metadata, CapabilitiesFinder capFinder, RuleStack rules, AnalysisRecord analysisRecord, CommandContext context)
Execute the rule as described in the class comments.String
toString()
-
-
-
Method Detail
-
execute
public PlanNode execute(PlanNode plan, QueryMetadataInterface metadata, CapabilitiesFinder capFinder, RuleStack rules, AnalysisRecord analysisRecord, CommandContext context) throws QueryPlannerException, TeiidComponentException
Execute the rule as described in the class comments.- Specified by:
execute
in interfaceOptimizerRule
- Parameters:
plan
- Incoming query plan, may be modified during method and may be returned from methodmetadata
- Metadata sourcerules
- Rules from optimizer rule stack, may be manipulated during method- Returns:
- Updated query plan if rule fired, else original query plan
- Throws:
QueryPlannerException
TeiidComponentException
-
-