Class GenericInfoOptimizer
- java.lang.Object
-
- org.eclipse.rdf4j.query.algebra.helpers.AbstractSimpleQueryModelVisitor<OptimizationException>
-
- org.eclipse.rdf4j.federated.optimizer.GenericInfoOptimizer
-
- All Implemented Interfaces:
FedXOptimizer
,QueryModelVisitor<OptimizationException>
public class GenericInfoOptimizer extends AbstractSimpleQueryModelVisitor<OptimizationException> implements FedXOptimizer
Generic optimizer Tasks: - Collect information (hasUnion, hasFilter, hasService) - Collect all statements in a list (for source selection), do not collect SERVICE expressions - Collect all Join arguments and group them in the NJoin structure for easier optimization (flatten)- Author:
- Andreas Schwarte
-
-
Constructor Summary
Constructors Constructor Description GenericInfoOptimizer(QueryInfo queryInfo)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
getLimit()
List<Service>
getServices()
List<StatementPattern>
getStatements()
boolean
hasFilter()
boolean
hasLimit()
boolean
hasService()
boolean
hasUnion()
void
meet(DescribeOperator node)
void
meet(Filter filter)
void
meet(Join node)
void
meet(LeftJoin node)
void
meet(Projection node)
void
meet(Service service)
void
meet(Slice node)
void
meet(StatementPattern node)
void
meet(Union union)
void
optimize(TupleExpr tupleExpr)
Optimize the provided tuple expression-
Methods 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, meetBinaryTupleOperator, meetBinaryValueOperator, meetCompareSubQueryValueOperator, meetNAryValueOperator, meetOther, meetSubQueryValueOperator, meetUnaryTupleOperator, meetUnaryValueOperator, meetUnsupported, meetUpdateExpr
-
-
-
-
Field Detail
-
hasFilter
protected boolean hasFilter
-
hasUnion
protected boolean hasUnion
-
limit
protected long limit
-
stmts
protected List<StatementPattern> stmts
-
queryInfo
protected final QueryInfo queryInfo
-
-
Constructor Detail
-
GenericInfoOptimizer
public GenericInfoOptimizer(QueryInfo queryInfo)
-
-
Method Detail
-
hasFilter
public boolean hasFilter()
-
hasUnion
public boolean hasUnion()
-
getStatements
public List<StatementPattern> getStatements()
-
hasLimit
public boolean hasLimit()
-
getLimit
public long getLimit()
-
optimize
public void optimize(TupleExpr tupleExpr)
Description copied from interface:FedXOptimizer
Optimize the provided tuple expression- Specified by:
optimize
in interfaceFedXOptimizer
-
meet
public void meet(Union union)
- Specified by:
meet
in interfaceQueryModelVisitor<OptimizationException>
- Overrides:
meet
in classAbstractSimpleQueryModelVisitor<OptimizationException>
-
meet
public void meet(Filter filter)
- Specified by:
meet
in interfaceQueryModelVisitor<OptimizationException>
- Overrides:
meet
in classAbstractSimpleQueryModelVisitor<OptimizationException>
-
meet
public void meet(Service service)
- Specified by:
meet
in interfaceQueryModelVisitor<OptimizationException>
- Overrides:
meet
in classAbstractSimpleQueryModelVisitor<OptimizationException>
-
meet
public void meet(Join node)
- Specified by:
meet
in interfaceQueryModelVisitor<OptimizationException>
- Overrides:
meet
in classAbstractSimpleQueryModelVisitor<OptimizationException>
-
meet
public void meet(LeftJoin node) throws OptimizationException
- Specified by:
meet
in interfaceQueryModelVisitor<OptimizationException>
- Overrides:
meet
in classAbstractSimpleQueryModelVisitor<OptimizationException>
- Throws:
OptimizationException
-
meet
public void meet(StatementPattern node)
- Specified by:
meet
in interfaceQueryModelVisitor<OptimizationException>
- Overrides:
meet
in classAbstractSimpleQueryModelVisitor<OptimizationException>
-
meet
public void meet(Projection node) throws OptimizationException
- Specified by:
meet
in interfaceQueryModelVisitor<OptimizationException>
- Overrides:
meet
in classAbstractSimpleQueryModelVisitor<OptimizationException>
- Throws:
OptimizationException
-
meet
public void meet(Slice node) throws OptimizationException
- Specified by:
meet
in interfaceQueryModelVisitor<OptimizationException>
- Overrides:
meet
in classAbstractSimpleQueryModelVisitor<OptimizationException>
- Throws:
OptimizationException
-
meet
public void meet(DescribeOperator node) throws OptimizationException
- Specified by:
meet
in interfaceQueryModelVisitor<OptimizationException>
- Overrides:
meet
in classAbstractSimpleQueryModelVisitor<OptimizationException>
- Throws:
OptimizationException
-
hasService
public boolean hasService()
-
-