Class ProjectRemoval
java.lang.Object
se.liu.ida.hefquin.engine.queryproc.impl.loptimizer.heuristics.ProjectRemoval
- All Implemented Interfaces:
HeuristicForLogicalOptimization
A heuristic that removes project operators for which the
mayReduce
flag is not set.
This heuristic is meant to be applied after ProjectPushDown which
aims to push projections as far down in the plan as possible and, in this
process, may leave several project operators all over the plan.
Such operators are unnecessary when they do not contribute to duplicate reduction.
Therefore, this heuristic removes project operators with mayReduce = false,
while retaining those with mayReduce = true.
More background: Pushing down project operators is useful for two reasons:
- If a projection ends up being pushed down all the way into a request operator, this request operator retrieves less data.
- If the query uses
SELECT DISTINCT, duplicate removal through ourmayReduceflags may become more effective in some cases if there are project operators in the plan that project away unnecessary variables early.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionapply(LogicalPlan inputPlan) apply(LogicalPlan inputPlan, QueryProcContext ctxt) Applies this heuristics to the given plan and returns the resulting, potentially rewritten plan.
-
Constructor Details
-
ProjectRemoval
public ProjectRemoval()
-
-
Method Details
-
apply
public LogicalPlan apply(LogicalPlan inputPlan, QueryProcContext ctxt) throws LogicalOptimizationException Description copied from interface:HeuristicForLogicalOptimizationApplies this heuristics to the given plan and returns the resulting, potentially rewritten plan.- Specified by:
applyin interfaceHeuristicForLogicalOptimization- Throws:
LogicalOptimizationException
-
apply
-