Class DefaultEvaluationStrategy
java.lang.Object
org.eclipse.rdf4j.query.algebra.evaluation.impl.DefaultEvaluationStrategy
- All Implemented Interfaces:
EvaluationStrategy,FederatedServiceResolver,FederatedServiceResolverClient
- Direct Known Subclasses:
StrictEvaluationStrategy
public class DefaultEvaluationStrategy
extends Object
implements EvaluationStrategy, FederatedServiceResolverClient
Default SPARQL 1.1 Query Evaluation strategy, to evaluate one
TupleExpr on the given TripleSource,
optionally using the given Dataset. The behaviour of this strategy can be modified by setting the
QueryEvaluationMode, which determines if the SPARQL query is
evaluated using strict compliance or standard
compliance.- Author:
- Jeen Broekstra, James Leigh, Arjohn Kampman, David Huynh, Andreas Schwarte
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final Datasetprotected FederatedServiceResolverprotected final TripleSource -
Constructor Summary
ConstructorsConstructorDescriptionDefaultEvaluationStrategy(TripleSource tripleSource, FederatedServiceResolver serviceResolver) DefaultEvaluationStrategy(TripleSource tripleSource, Dataset dataset, FederatedServiceResolver serviceResolver) DefaultEvaluationStrategy(TripleSource tripleSource, Dataset dataset, FederatedServiceResolver serviceResolver, long iterationCacheSyncTreshold, EvaluationStatistics evaluationStatistics) DefaultEvaluationStrategy(TripleSource tripleSource, Dataset dataset, FederatedServiceResolver serviceResolver, long iterationCacheSyncTreshold, EvaluationStatistics evaluationStatistics, boolean trackResultSize) DefaultEvaluationStrategy(TripleSource tripleSource, Dataset dataset, FederatedServiceResolver serviceResolver, long iterationCacheSyncTreshold, EvaluationStatistics evaluationStatistics, boolean trackResultSize, TupleFunctionRegistry tupleFunctionRegistry) -
Method Summary
Modifier and TypeMethodDescriptionprotected static CloseableIteration<BindingSet>evaluate(TupleFunction func, List<Var> resultVars, BindingSet bindings, ValueFactory valueFactory, Value... argValues) evaluate(Regex node, BindingSet bindings) Deprecated, for removal: This API element is subject to removal in a future version.evaluate(TripleRef ref, BindingSet bindings) evaluates a TripleRef node returning bindingsets from the matched Triple nodes in the dataset (or explore standard reification)evaluate(TupleExpr expr, BindingSet bindings) Deprecated, for removal: This API element is subject to removal in a future version.evaluate(ValueExpr expr, BindingSet bindings) Deprecated, for removal: This API element is subject to removal in a future version.Gets theFederatedServiceResolverused by this client.protected longgetLimit(QueryModelNode node) Returns the limit of the current variable bindings before any further projection.getService(String serviceUrl) Retrieve theFederatedServiceregistered for serviceUrl.static ValuegetVarValue(Var var, BindingSet bindings) protected booleanbooleanisTrue(QueryValueEvaluationStep expr, BindingSet bindings) booleanisTrue(ValueExpr expr, BindingSet bindings) Evaluates the boolean expression on the supplied TripleSource object.optimize(TupleExpr expr, EvaluationStatistics evaluationStatistics, BindingSet bindings) Execute theQueryOptimizerPipelineon the givenTupleExprto optimize its execution plan.precompile(TupleExpr expr) Prepare a QueryEvaluationStep that tries to do as much work once per query avoiding repeated calls to the same code as much as possible.precompile(TupleExpr expr, QueryEvaluationContext context) precompile(ValueExpr expr, QueryEvaluationContext context) protected QueryEvaluationStepprepare(ArbitraryLengthPath alp, QueryEvaluationContext context) protected QueryEvaluationStepprepare(BinaryTupleOperator expr, QueryEvaluationContext context) protected QueryEvaluationStepprepare(BindingSetAssignment node, QueryEvaluationContext context) protected QueryValueEvaluationStepprepare(BNodeGenerator node, QueryEvaluationContext context) protected QueryValueEvaluationStepprepare(Bound node, QueryEvaluationContext context) protected QueryValueEvaluationStepprepare(Coalesce node, QueryEvaluationContext context) protected QueryValueEvaluationStepprepare(CompareAll node, QueryEvaluationContext context) protected QueryValueEvaluationStepprepare(CompareAny node, QueryEvaluationContext context) protected QueryValueEvaluationStepprepare(Compare node, QueryEvaluationContext context) protected QueryValueEvaluationStepprepare(Datatype node, QueryEvaluationContext context) protected QueryEvaluationStepprepare(DescribeOperator node, QueryEvaluationContext context) protected QueryEvaluationStepprepare(Difference node, QueryEvaluationContext context) protected QueryEvaluationStepprepare(Distinct node, QueryEvaluationContext context) protected QueryEvaluationStepprepare(EmptySet emptySet, QueryEvaluationContext context) protected QueryValueEvaluationStepprepare(Now node, QueryEvaluationContext context) During the execution of a single query NOW() should always return the same result and is in practical terms a constant during evaluation.protected QueryValueEvaluationStepprepare(Exists node, QueryEvaluationContext context) protected QueryEvaluationStepprepare(Extension node, QueryEvaluationContext context) protected QueryEvaluationStepprepare(Filter node, QueryEvaluationContext context) prepare(FunctionCall node, QueryEvaluationContext context) protected QueryEvaluationStepprepare(Group node, QueryEvaluationContext context) protected QueryValueEvaluationStepprepare(If node, QueryEvaluationContext context) protected QueryValueEvaluationStepprepare(In node, QueryEvaluationContext context) protected QueryEvaluationStepprepare(Intersection node, QueryEvaluationContext context) protected QueryValueEvaluationStepprepare(IRIFunction node, QueryEvaluationContext context) protected QueryValueEvaluationStepprepare(IsBNode node, QueryEvaluationContext context) protected QueryValueEvaluationStepprepare(IsLiteral node, QueryEvaluationContext context) protected QueryValueEvaluationStepprepare(IsNumeric node, QueryEvaluationContext context) protected QueryValueEvaluationStepprepare(IsResource node, QueryEvaluationContext context) protected QueryValueEvaluationStepprepare(IsURI node, QueryEvaluationContext context) protected QueryEvaluationStepprepare(Join node, QueryEvaluationContext context) protected QueryValueEvaluationStepprepare(Label node, QueryEvaluationContext context) protected QueryValueEvaluationStepprepare(LangMatches node, QueryEvaluationContext context) protected QueryValueEvaluationStepprepare(Lang node, QueryEvaluationContext context) protected QueryEvaluationStepprepare(LeftJoin node, QueryEvaluationContext context) protected QueryValueEvaluationStepprepare(ListMemberOperator node, QueryEvaluationContext context) protected QueryValueEvaluationStepprepare(LocalName node, QueryEvaluationContext context) protected QueryValueEvaluationStepprepare(MathExpr node, QueryEvaluationContext context) protected QueryEvaluationStepprepare(MultiProjection node, QueryEvaluationContext context) protected QueryValueEvaluationStepprepare(Namespace node, QueryEvaluationContext context) protected QueryValueEvaluationStepprepare(Not node, QueryEvaluationContext context) protected QueryEvaluationStepprepare(Order node, QueryEvaluationContext context) protected QueryValueEvaluationStepprepare(Or node, QueryEvaluationContext context) protected QueryEvaluationStepprepare(Projection node, QueryEvaluationContext context) protected QueryEvaluationStepprepare(QueryRoot node, QueryEvaluationContext context) protected QueryEvaluationStepprepare(Reduced node, QueryEvaluationContext context) protected QueryValueEvaluationStepprepare(Regex node, QueryEvaluationContext context) Determines whether the two operands match according to theregexoperator.protected QueryValueEvaluationStepprepare(SameTerm node, QueryEvaluationContext context) protected QueryEvaluationStepprepare(Service service, QueryEvaluationContext context) protected QueryEvaluationStepprepare(SingletonSet singletonSet, QueryEvaluationContext context) protected QueryEvaluationStepprepare(Slice node, QueryEvaluationContext context) protected QueryEvaluationStepprepare(StatementPattern node, QueryEvaluationContext context) protected QueryValueEvaluationStepprepare(Str node, QueryEvaluationContext context) protected QueryEvaluationStepprepare(TripleRef ref, QueryEvaluationContext context) protected QueryEvaluationStepprepare(TupleFunctionCall expr, QueryEvaluationContext context) protected QueryEvaluationStepprepare(UnaryTupleOperator expr, QueryEvaluationContext context) protected QueryEvaluationStepprepare(Union node, QueryEvaluationContext context) protected QueryValueEvaluationStepprepare(ValueConstant valueConstant, QueryEvaluationContext context) protected QueryValueEvaluationStepprepare(ValueExprTripleRef node, QueryEvaluationContext context) protected QueryValueEvaluationStepprepare(Var var, QueryEvaluationContext context) protected QueryEvaluationStepprepare(ZeroLengthPath zlp, QueryEvaluationContext context) voidSet the collection factory that will create the collections to use during query evaluaton.voidSets theFederatedServiceResolverto use for this client.voidsetOptimizerPipeline(QueryOptimizerPipeline pipeline) Set theQueryOptimizerPipelineto use for optimizing any incoming queries.voidsetQueryEvaluationMode(QueryEvaluationMode queryEvaluationMode) voidsetTrackResultSize(boolean trackResultSize) Enable or disable results size tracking for the query plan.voidsetTrackTime(boolean trackTime) Enable or disable time tracking for the query plan.protected QueryValueEvaluationStepsupplyBinaryValueEvaluation(BinaryValueOperator node, BiFunction<Value, Value, Value> operation, QueryEvaluationContext context) Supply a QueryValueEvalationStep that will invoke the function (operator passed in).protected QueryValueEvaluationStepsupplyUnaryValueEvaluation(UnaryValueOperator node, Function<Value, Value> operation, QueryEvaluationContext context) Return a QueryEvaluationStep that applies constant propegation.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.eclipse.rdf4j.query.algebra.evaluation.EvaluationStrategy
isTrackResultSize
-
Field Details
-
tripleSource
-
dataset
-
serviceResolver
-
-
Constructor Details
-
DefaultEvaluationStrategy
public DefaultEvaluationStrategy(TripleSource tripleSource, FederatedServiceResolver serviceResolver) -
DefaultEvaluationStrategy
public DefaultEvaluationStrategy(TripleSource tripleSource, Dataset dataset, FederatedServiceResolver serviceResolver) -
DefaultEvaluationStrategy
public DefaultEvaluationStrategy(TripleSource tripleSource, Dataset dataset, FederatedServiceResolver serviceResolver, long iterationCacheSyncTreshold, EvaluationStatistics evaluationStatistics) -
DefaultEvaluationStrategy
public DefaultEvaluationStrategy(TripleSource tripleSource, Dataset dataset, FederatedServiceResolver serviceResolver, long iterationCacheSyncTreshold, EvaluationStatistics evaluationStatistics, boolean trackResultSize) -
DefaultEvaluationStrategy
public DefaultEvaluationStrategy(TripleSource tripleSource, Dataset dataset, FederatedServiceResolver serviceResolver, long iterationCacheSyncTreshold, EvaluationStatistics evaluationStatistics, boolean trackResultSize, TupleFunctionRegistry tupleFunctionRegistry)
-
-
Method Details
-
evaluate
protected static CloseableIteration<BindingSet> evaluate(TupleFunction func, List<Var> resultVars, BindingSet bindings, ValueFactory valueFactory, Value... argValues) throws QueryEvaluationException - Throws:
QueryEvaluationException
-
setFederatedServiceResolver
Description copied from interface:FederatedServiceResolverClientSets theFederatedServiceResolverto use for this client.- Specified by:
setFederatedServiceResolverin interfaceFederatedServiceResolverClient- Parameters:
resolver- The resolver to use.
-
getFederatedServiceResolver
Description copied from interface:FederatedServiceResolverClientGets theFederatedServiceResolverused by this client.- Specified by:
getFederatedServiceResolverin interfaceFederatedServiceResolverClient
-
getService
Description copied from interface:EvaluationStrategyRetrieve theFederatedServiceregistered for serviceUrl. If there is no service registered for serviceUrl, a newSPARQLFederatedServiceis created and registered.- Specified by:
getServicein interfaceEvaluationStrategy- Specified by:
getServicein interfaceFederatedServiceResolver- Parameters:
serviceUrl- URL of the service.- Returns:
- the
FederatedServiceregistered for the serviceUrl. - Throws:
QueryEvaluationException- If there was an exception generated while retrieving the service.- See Also:
-
setOptimizerPipeline
Description copied from interface:EvaluationStrategySet theQueryOptimizerPipelineto use for optimizing any incoming queries.- Specified by:
setOptimizerPipelinein interfaceEvaluationStrategy- Parameters:
pipeline- theQueryOptimizerPipeline.- See Also:
-
optimize
public TupleExpr optimize(TupleExpr expr, EvaluationStatistics evaluationStatistics, BindingSet bindings) Execute theQueryOptimizerPipelineon the givenTupleExprto optimize its execution plan.- Specified by:
optimizein interfaceEvaluationStrategy- Parameters:
expr- theTupleExprto optimize.evaluationStatistics- this param is ignored!bindings- a-priori bindings supplied for the query, which can potentially be inlined.- Returns:
- the optimized
TupleExpr. - Since:
- 3.0
- See Also:
-
evaluate
@Deprecated(forRemoval=true) public CloseableIteration<BindingSet> evaluate(TupleExpr expr, BindingSet bindings) throws QueryEvaluationException Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:EvaluationStrategyEvaluates the tuple expression against the supplied triple source with the specified set of variable bindings as input.- Specified by:
evaluatein interfaceEvaluationStrategy- Parameters:
expr- The Tuple Expression to evaluatebindings- The variables bindings to use for evaluating the expression, if applicable.- Returns:
- A closeable iterator over the variable binding sets that match the tuple expression.
- Throws:
QueryEvaluationException
-
precompile
Description copied from interface:EvaluationStrategyPrepare a QueryEvaluationStep that tries to do as much work once per query avoiding repeated calls to the same code as much as possible. This depends on java invoke dynamic for performance.- Specified by:
precompilein interfaceEvaluationStrategy- Parameters:
expr- that is to be evaluated later- Returns:
- a QueryEvaluationStep that may avoid doing repeating the same work over and over.
-
precompile
- Specified by:
precompilein interfaceEvaluationStrategy
-
prepare
protected QueryEvaluationStep prepare(ArbitraryLengthPath alp, QueryEvaluationContext context) throws QueryEvaluationException - Throws:
QueryEvaluationException
-
prepare
protected QueryEvaluationStep prepare(ZeroLengthPath zlp, QueryEvaluationContext context) throws QueryEvaluationException - Throws:
QueryEvaluationException
-
prepare
protected QueryEvaluationStep prepare(Difference node, QueryEvaluationContext context) throws QueryEvaluationException - Throws:
QueryEvaluationException
-
prepare
protected QueryEvaluationStep prepare(Group node, QueryEvaluationContext context) throws QueryEvaluationException - Throws:
QueryEvaluationException
-
prepare
protected QueryEvaluationStep prepare(Intersection node, QueryEvaluationContext context) throws QueryEvaluationException - Throws:
QueryEvaluationException
-
prepare
protected QueryEvaluationStep prepare(Join node, QueryEvaluationContext context) throws QueryEvaluationException - Throws:
QueryEvaluationException
-
prepare
protected QueryEvaluationStep prepare(LeftJoin node, QueryEvaluationContext context) throws QueryEvaluationException - Throws:
QueryEvaluationException
-
prepare
protected QueryEvaluationStep prepare(MultiProjection node, QueryEvaluationContext context) throws QueryEvaluationException - Throws:
QueryEvaluationException
-
prepare
protected QueryEvaluationStep prepare(Projection node, QueryEvaluationContext context) throws QueryEvaluationException - Throws:
QueryEvaluationException
-
prepare
protected QueryEvaluationStep prepare(QueryRoot node, QueryEvaluationContext context) throws QueryEvaluationException - Throws:
QueryEvaluationException
-
prepare
protected QueryEvaluationStep prepare(StatementPattern node, QueryEvaluationContext context) throws QueryEvaluationException - Throws:
QueryEvaluationException
-
prepare
protected QueryEvaluationStep prepare(Union node, QueryEvaluationContext context) throws QueryEvaluationException - Throws:
QueryEvaluationException
-
prepare
protected QueryEvaluationStep prepare(Slice node, QueryEvaluationContext context) throws QueryEvaluationException - Throws:
QueryEvaluationException
-
prepare
protected QueryEvaluationStep prepare(Extension node, QueryEvaluationContext context) throws QueryEvaluationException - Throws:
QueryEvaluationException
-
prepare
protected QueryEvaluationStep prepare(Service service, QueryEvaluationContext context) throws QueryEvaluationException - Throws:
QueryEvaluationException
-
prepare
protected QueryEvaluationStep prepare(Filter node, QueryEvaluationContext context) throws QueryEvaluationException - Throws:
QueryEvaluationException
-
prepare
protected QueryEvaluationStep prepare(Order node, QueryEvaluationContext context) throws QueryEvaluationException - Throws:
QueryEvaluationException
-
prepare
protected QueryEvaluationStep prepare(BindingSetAssignment node, QueryEvaluationContext context) throws QueryEvaluationException - Throws:
QueryEvaluationException
-
prepare
protected QueryEvaluationStep prepare(DescribeOperator node, QueryEvaluationContext context) throws QueryEvaluationException - Throws:
QueryEvaluationException
-
prepare
protected QueryEvaluationStep prepare(Distinct node, QueryEvaluationContext context) throws QueryEvaluationException - Throws:
QueryEvaluationException
-
prepare
protected QueryEvaluationStep prepare(Reduced node, QueryEvaluationContext context) throws QueryEvaluationException - Throws:
QueryEvaluationException
-
prepare
protected QueryEvaluationStep prepare(TupleFunctionCall expr, QueryEvaluationContext context) throws QueryEvaluationException - Throws:
QueryEvaluationException
-
getVarValue
-
prepare
protected QueryEvaluationStep prepare(UnaryTupleOperator expr, QueryEvaluationContext context) throws QueryEvaluationException - Throws:
QueryEvaluationException
-
prepare
protected QueryEvaluationStep prepare(BinaryTupleOperator expr, QueryEvaluationContext context) throws QueryEvaluationException - Throws:
QueryEvaluationException
-
prepare
protected QueryEvaluationStep prepare(SingletonSet singletonSet, QueryEvaluationContext context) throws QueryEvaluationException - Throws:
QueryEvaluationException
-
prepare
protected QueryEvaluationStep prepare(EmptySet emptySet, QueryEvaluationContext context) throws QueryEvaluationException - Throws:
QueryEvaluationException
-
precompile
public QueryValueEvaluationStep precompile(ValueExpr expr, QueryEvaluationContext context) throws QueryEvaluationException - Specified by:
precompilein interfaceEvaluationStrategy- Throws:
QueryEvaluationException
-
evaluate
@Deprecated(forRemoval=true) public Value evaluate(ValueExpr expr, BindingSet bindings) throws QueryEvaluationException Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:EvaluationStrategyGets the value of this expression.- Specified by:
evaluatein interfaceEvaluationStrategybindings- The variables bindings to use for evaluating the expression, if applicable.- Returns:
- The Value that this expression evaluates to, or null if the expression could not be evaluated.
- Throws:
QueryEvaluationException
-
prepare
protected QueryValueEvaluationStep prepare(Var var, QueryEvaluationContext context) throws QueryEvaluationException - Throws:
QueryEvaluationException
-
prepare
protected QueryValueEvaluationStep prepare(ValueConstant valueConstant, QueryEvaluationContext context) throws QueryEvaluationException - Throws:
QueryEvaluationException
-
prepare
protected QueryValueEvaluationStep prepare(BNodeGenerator node, QueryEvaluationContext context) throws QueryEvaluationException - Throws:
QueryEvaluationException
-
prepare
protected QueryValueEvaluationStep prepare(Bound node, QueryEvaluationContext context) throws QueryEvaluationException - Throws:
QueryEvaluationException
-
prepare
protected QueryValueEvaluationStep prepare(Str node, QueryEvaluationContext context) throws QueryEvaluationException - Throws:
QueryEvaluationException
-
prepare
protected QueryValueEvaluationStep prepare(Label node, QueryEvaluationContext context) throws QueryEvaluationException - Throws:
QueryEvaluationException
-
prepare
-
prepare
-
prepare
-
prepare
-
prepare
-
prepare
-
prepare
-
prepare
-
prepare
-
prepare
-
evaluate
@Deprecated(forRemoval=true) public Value evaluate(Regex node, BindingSet bindings) throws QueryEvaluationException Deprecated, for removal: This API element is subject to removal in a future version.Determines whether the two operands match according to theregexoperator.- Returns:
- true if the operands match according to the regex operator, false otherwise.
- Throws:
QueryEvaluationException
-
prepare
protected QueryValueEvaluationStep prepare(Regex node, QueryEvaluationContext context) throws QueryEvaluationException Determines whether the two operands match according to theregexoperator.- Returns:
- true if the operands match according to the regex operator, false otherwise.
- Throws:
QueryEvaluationException
-
prepare
-
prepare
public QueryValueEvaluationStep prepare(FunctionCall node, QueryEvaluationContext context) throws QueryEvaluationException - Throws:
QueryEvaluationException
-
prepare
protected QueryValueEvaluationStep prepare(Or node, QueryEvaluationContext context) throws QueryEvaluationException - Throws:
QueryEvaluationException
-
prepare
-
prepare
During the execution of a single query NOW() should always return the same result and is in practical terms a constant during evaluation.- Parameters:
node- that represent the NOW() functioncontext- that holds the shared now() of the query invocation- Returns:
- a constant value evaluation step
-
prepare
-
prepare
protected QueryValueEvaluationStep prepare(Coalesce node, QueryEvaluationContext context) throws QueryEvaluationException - Throws:
QueryEvaluationException
-
prepare
-
prepare
-
prepare
protected QueryValueEvaluationStep prepare(If node, QueryEvaluationContext context) throws QueryEvaluationException - Throws:
QueryEvaluationException
-
prepare
protected QueryValueEvaluationStep prepare(In node, QueryEvaluationContext context) throws QueryEvaluationException - Throws:
QueryEvaluationException
-
prepare
protected QueryValueEvaluationStep prepare(ListMemberOperator node, QueryEvaluationContext context) throws QueryEvaluationException - Throws:
QueryEvaluationException
-
prepare
protected QueryValueEvaluationStep prepare(CompareAny node, QueryEvaluationContext context) throws QueryEvaluationException - Throws:
QueryEvaluationException
-
prepare
protected QueryValueEvaluationStep prepare(CompareAll node, QueryEvaluationContext context) throws QueryEvaluationException - Throws:
QueryEvaluationException
-
prepare
protected QueryValueEvaluationStep prepare(Exists node, QueryEvaluationContext context) throws QueryEvaluationException - Throws:
QueryEvaluationException
-
isTrue
Description copied from interface:EvaluationStrategyEvaluates the boolean expression on the supplied TripleSource object.- Specified by:
isTruein interfaceEvaluationStrategybindings- The variables bindings to use for evaluating the expression, if applicable.- Returns:
- The result of the evaluation.
- Throws:
ValueExprEvaluationException- If the value expression could not be evaluated, for example when comparing two incompatible operands. When thrown, the result of the boolean expression is neither true nor false , but unknown.QueryEvaluationException
-
isTrue
public boolean isTrue(QueryValueEvaluationStep expr, BindingSet bindings) throws QueryEvaluationException - Specified by:
isTruein interfaceEvaluationStrategy- Throws:
QueryEvaluationException
-
isReducedOrDistinct
-
getLimit
Returns the limit of the current variable bindings before any further projection. -
prepare
protected QueryValueEvaluationStep prepare(ValueExprTripleRef node, QueryEvaluationContext context) throws QueryEvaluationException - Throws:
QueryEvaluationException
-
evaluate
evaluates a TripleRef node returning bindingsets from the matched Triple nodes in the dataset (or explore standard reification)- Parameters:
ref- to evaluatebindings- with the solutions- Returns:
- iteration over the solutions
-
prepare
-
setTrackResultSize
public void setTrackResultSize(boolean trackResultSize) Description copied from interface:EvaluationStrategyEnable or disable results size tracking for the query plan. Useful to determine which parts of a query plan generated the most data.- Specified by:
setTrackResultSizein interfaceEvaluationStrategy- Parameters:
trackResultSize- true to enable tracking.
-
setTrackTime
public void setTrackTime(boolean trackTime) Description copied from interface:EvaluationStrategyEnable or disable time tracking for the query plan. Useful to determine which parts of a query plan take the most time to evaluate.- Specified by:
setTrackTimein interfaceEvaluationStrategy- Parameters:
trackTime- true to enable tracking.
-
supplyBinaryValueEvaluation
protected QueryValueEvaluationStep supplyBinaryValueEvaluation(BinaryValueOperator node, BiFunction<Value, Value, Value> operation, QueryEvaluationContext context) Supply a QueryValueEvalationStep that will invoke the function (operator passed in). It will try to optimise constant argument to be called only once per query run,- Parameters:
node- the node to evaluateoperation- the function that wraps the operator.context- in which the query is running.- Returns:
- a potential constant evaluation step.
-
supplyUnaryValueEvaluation
protected QueryValueEvaluationStep supplyUnaryValueEvaluation(UnaryValueOperator node, Function<Value, Value> operation, QueryEvaluationContext context) Return a QueryEvaluationStep that applies constant propegation.- Parameters:
node- that will be evaluated/preparedoperation- the task to be donecontext- in which the evaluation takes place- Returns:
- a potentially constant step
-
getQueryEvaluationMode
- Specified by:
getQueryEvaluationModein interfaceEvaluationStrategy- Returns:
- the queryEvaluationMode
-
setQueryEvaluationMode
- Specified by:
setQueryEvaluationModein interfaceEvaluationStrategy- Parameters:
queryEvaluationMode- the queryEvaluationMode to set
-
getCollectionFactory
- Specified by:
getCollectionFactoryin interfaceEvaluationStrategy
-
setCollectionFactory
Description copied from interface:EvaluationStrategySet the collection factory that will create the collections to use during query evaluaton.- Specified by:
setCollectionFactoryin interfaceEvaluationStrategy- Parameters:
cf- CollectionFactory that should be used during future query evaluations
-