Class StatementGroupAndJoinOptimizer
java.lang.Object
org.eclipse.rdf4j.query.algebra.helpers.AbstractSimpleQueryModelVisitor<OptimizationException>
org.eclipse.rdf4j.federated.optimizer.StatementGroupAndJoinOptimizer
- All Implemented Interfaces:
FedXOptimizer
,QueryModelVisitor<OptimizationException>
public class StatementGroupAndJoinOptimizer
extends AbstractSimpleQueryModelVisitor<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.AbstractSimpleQueryModelVisitor
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, meet, meetBinaryTupleOperator, meetBinaryValueOperator, meetCompareSubQueryValueOperator, meetNAryValueOperator, meetSubQueryValueOperator, meetUnaryTupleOperator, meetUnaryValueOperator, meetUnsupported, 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
- Parameters:
tupleExpr
-
-
meet
- Specified by:
meet
in interfaceQueryModelVisitor<OptimizationException>
- Overrides:
meet
in classAbstractSimpleQueryModelVisitor<OptimizationException>
-
meetOther
- Specified by:
meetOther
in interfaceQueryModelVisitor<OptimizationException>
- Overrides:
meetOther
in classAbstractSimpleQueryModelVisitor<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
-