Class StatementGroupAndJoinOptimizer
java.lang.Object
org.eclipse.rdf4j.query.algebra.helpers.AbstractQueryModelVisitor<OptimizationException>
org.eclipse.rdf4j.federated.optimizer.StatementGroupAndJoinOptimizer
- All Implemented Interfaces:
FedXOptimizer
,QueryModelVisitor<OptimizationException>
public class StatementGroupAndJoinOptimizer
extends AbstractQueryModelVisitor<OptimizationException>
implements FedXOptimizer
Optimizer with the following tasks:
1. Group
ExclusiveStatement
into ExclusiveGroup
2. Adjust the join order using
DefaultFedXCostModel
- Author:
- as
-
Field Summary
-
Constructor Summary
ConstructorDescriptionStatementGroupAndJoinOptimizer
(QueryInfo queryInfo, FedXCostModel costModel) -
Method Summary
Modifier and TypeMethodDescriptionprotected double
estimateCost
(TupleExpr tupleExpr, Set<String> joinVars) formGroups
(List<TupleExpr> originalArgs) GroupExclusiveStatement
s having the same source into anExclusiveGroup
.void
protected void
void
meetOther
(QueryModelNode node) void
Optimize the provided tuple expressionoptimizeJoinOrder
(List<TupleExpr> joinArgs) Join Order Optimizer Group -> Statements according to number of free Variables Additional Heuristics: - ExclusiveGroups are cheaper than any other subquery - owned statements are cheaper if they have a single free variableMethods inherited from class org.eclipse.rdf4j.query.algebra.helpers.AbstractQueryModelVisitor
meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meetBinaryTupleOperator, meetBinaryValueOperator, meetCompareSubQueryValueOperator, meetNAryValueOperator, meetNode, meetSubQueryValueOperator, meetUnaryTupleOperator, meetUnaryValueOperator, meetUpdateExpr
-
Field Details
-
queryInfo
-
-
Constructor Details
-
StatementGroupAndJoinOptimizer
-
-
Method Details
-
optimize
Description copied from interface:FedXOptimizer
Optimize the provided tuple expression- Specified by:
optimize
in interfaceFedXOptimizer
-
meet
- Specified by:
meet
in interfaceQueryModelVisitor<OptimizationException>
- Overrides:
meet
in classAbstractQueryModelVisitor<OptimizationException>
-
meetOther
- Specified by:
meetOther
in interfaceQueryModelVisitor<OptimizationException>
- Overrides:
meetOther
in classAbstractQueryModelVisitor<OptimizationException>
-
meetNJoin
-
formGroups
GroupExclusiveStatement
s having the same source into anExclusiveGroup
.- Parameters:
originalArgs
-- Returns:
- the new (potentially grouped) join arguments. If empty, the join will not produce any results.
-
optimizeJoinOrder
Join Order Optimizer Group -> Statements according to number of free Variables Additional Heuristics: - ExclusiveGroups are cheaper than any other subquery - owned statements are cheaper if they have a single free variable- Parameters:
joinArgs
-- Returns:
-
estimateCost
-