Class LogicalServiceQuery
- java.lang.Object
-
- com.complexible.stardog.plan.eval.service.ServiceQuery
-
- com.complexible.stardog.plan.eval.service.PlanNodeBodyServiceQuery
-
- com.complexible.stardog.plan.eval.service.LogicalServiceQuery
-
public class LogicalServiceQuery extends PlanNodeBodyServiceQuery
Service query which represents a logical service query to be used in the early stages of rewriting and optimization. Can be converted to aphysical query
when rewriting is complete.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static class
LogicalServiceQuery.LogicalServiceQueryBuilder
-
Nested classes/interfaces inherited from class com.complexible.stardog.plan.eval.service.PlanNodeBodyServiceQuery
PlanNodeBodyServiceQuery.CanonicalizedPlanNodeBodyServiceQuery, PlanNodeBodyServiceQuery.CanonicalizedPlanNodeBodyServiceQueryBuilder, PlanNodeBodyServiceQuery.PlanNodeBodyServiceQueryBuilder
-
Nested classes/interfaces inherited from class com.complexible.stardog.plan.eval.service.ServiceQuery
ServiceQuery.DistinctValuesEstimationFunction, ServiceQuery.ServiceQueryBuilder
-
-
Field Summary
Fields Modifier and Type Field Description protected Service
mService
-
Fields inherited from class com.complexible.stardog.plan.eval.service.ServiceQuery
mCardinality, mOptions
-
-
Constructor Summary
Constructors Constructor Description LogicalServiceQuery(Service theService, IRI theServiceIri, com.complexible.stardog.plan.PlanNode theBody)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
customTermReplacement()
com.complexible.stardog.plan.eval.operator.SolutionIterator
evaluate(com.complexible.stardog.plan.eval.ExecutionContext theContext, com.complexible.stardog.plan.eval.operator.Operator theArg, com.complexible.stardog.plan.PlanVarInfo theVarInfo)
Evaluate the queryboolean
isClosed()
Is the service query "closed"? or can we still use it?LogicalServiceQuery
replaceBody(com.complexible.stardog.plan.PlanNode newBody)
com.complexible.stardog.plan.PlanNode
replaceBodyTerms(com.complexible.stardog.plan.util.PlanNodeVarReplacer termReplacer, com.complexible.stardog.plan.ServicePlanNode node)
boolean
supportsConstantReplacement()
PlanNodeBodyServiceQuery.PlanNodeBodyServiceQueryBuilder
toBuilder()
com.complexible.stardog.plan.PlanNode
toPhysicalQuery(com.complexible.stardog.plan.eval.ExecutionContext execCxt, com.complexible.stardog.plan.QueryTerm context, java.util.function.IntFunction<java.lang.String> varNames, java.util.function.Function<java.lang.String,java.lang.Integer> varAllocator, boolean silent)
Translate the logical query to a physical plan tree, typically built using service queries as data sources.-
Methods inherited from class com.complexible.stardog.plan.eval.service.PlanNodeBodyServiceQuery
body, equals, explain, explainVerbose, getAllVars, getAssuredVars, getContextVars, getObjectVars, getPredicateVars, getSubjectVars, getTermPositionPredicate, hashCode, noopBuilder
-
Methods inherited from class com.complexible.stardog.plan.eval.service.ServiceQuery
alternativeDistinctValues, distinctValues, estimateCardinality, estimateJoinCardinality, evaluate, evaluateSilent, evaluateSilent, generatesValues, get, getCardinality, getNamespaces, getOptions, getRequiredInputBindings, getRequiredUnboundOutputs, getUnsatisfiableConstraintsMessage, hasDuplicates, isBodySparqlQuery, preservesJoinArgumentOrdering, serviceTerm, setCardinality, setNamespaces, supportsJoinArgument
-
-
-
-
Field Detail
-
mService
protected final Service mService
-
-
Method Detail
-
evaluate
public com.complexible.stardog.plan.eval.operator.SolutionIterator evaluate(com.complexible.stardog.plan.eval.ExecutionContext theContext, com.complexible.stardog.plan.eval.operator.Operator theArg, com.complexible.stardog.plan.PlanVarInfo theVarInfo) throws com.complexible.stardog.plan.eval.operator.OperatorException
Description copied from class:ServiceQuery
Evaluate the query- Specified by:
evaluate
in classServiceQuery
theArg
- a SIP join argument, null if not present. Solutions from the argument which satisfy the join must retain all bindings, including those which are not used in the join. Note that variables in the argument may be unassured.- Throws:
com.complexible.stardog.plan.eval.operator.OperatorException
-
replaceBody
public LogicalServiceQuery replaceBody(com.complexible.stardog.plan.PlanNode newBody)
- Overrides:
replaceBody
in classPlanNodeBodyServiceQuery
-
replaceBodyTerms
public com.complexible.stardog.plan.PlanNode replaceBodyTerms(com.complexible.stardog.plan.util.PlanNodeVarReplacer termReplacer, com.complexible.stardog.plan.ServicePlanNode node)
- Overrides:
replaceBodyTerms
in classPlanNodeBodyServiceQuery
-
toPhysicalQuery
public com.complexible.stardog.plan.PlanNode toPhysicalQuery(com.complexible.stardog.plan.eval.ExecutionContext execCxt, com.complexible.stardog.plan.QueryTerm context, java.util.function.IntFunction<java.lang.String> varNames, java.util.function.Function<java.lang.String,java.lang.Integer> varAllocator, boolean silent)
Translate the logical query to a physical plan tree, typically built using service queries as data sources.
-
isClosed
public boolean isClosed()
Description copied from class:ServiceQuery
Is the service query "closed"? or can we still use it?- Overrides:
isClosed
in classServiceQuery
-
toBuilder
public PlanNodeBodyServiceQuery.PlanNodeBodyServiceQueryBuilder toBuilder()
- Specified by:
toBuilder
in classPlanNodeBodyServiceQuery
-
customTermReplacement
public boolean customTermReplacement()
-
supportsConstantReplacement
public boolean supportsConstantReplacement()
-
-