Class FilterOptimizer
- java.lang.Object
-
- org.eclipse.rdf4j.query.algebra.evaluation.impl.FilterOptimizer
-
- All Implemented Interfaces:
QueryOptimizer
@Deprecated(forRemoval=true, since="4.1.0") public class FilterOptimizer extends Object implements QueryOptimizer
Deprecated, for removal: This API element is subject to removal in a future version.Optimizes a query model by pushingFilter
s as far down in the model tree as possible.To make the first optimization succeed more often it splits filters which contains
And
conditions.SELECT * WHERE { ?s ?p ?o . ?s ?p ?o2 . FILTER(?o > '2'^^xsd:int && ?o2 < '4'^^xsd:int) }
May be more efficient when decomposed intoSELECT * WHERE { ?s ?p ?o . FILTER(?o > '2'^^xsd:int) ?s ?p ?o2 . FILTER(?o2 < '4'^^xsd:int) }
Then it optimizes a query model by merging adjacent
Filter
s. e.g.SELECT * WHERE { ?s ?p ?o . FILTER(?o > 2) . FILTER(?o < 4) . }
may be merged intoSELECT * WHERE { ?s ?p ?o . FILTER(?o > 2 && ?o < 4) . }
This optimization allows for sharing evaluation costs in the future and removes an iterator. This is done as a second step to not break the first optimization. In the case that the splitting was done but did not help it is now undone.
- Author:
- Arjohn Kampman, Jerven Bolleman
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static class
FilterOptimizer.DeMergeFilterFinder
Deprecated, for removal: This API element is subject to removal in a future version.protected static class
FilterOptimizer.FilterFinder
Deprecated, for removal: This API element is subject to removal in a future version.protected static class
FilterOptimizer.FilterRelocator
Deprecated, for removal: This API element is subject to removal in a future version.protected static class
FilterOptimizer.MergeFilterFinder
Deprecated, for removal: This API element is subject to removal in a future version.
-
Constructor Summary
Constructors Constructor Description FilterOptimizer()
Deprecated, for removal: This API element is subject to removal in a future version.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
optimize(TupleExpr tupleExpr, Dataset dataset, BindingSet bindings)
Deprecated, for removal: This API element is subject to removal in a future version.
-
-
-
Method Detail
-
optimize
public void optimize(TupleExpr tupleExpr, Dataset dataset, BindingSet bindings)
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
optimize
in interfaceQueryOptimizer
-
-