Interface RecordQueryPlanWithIndex
-
- All Superinterfaces:
Bindable
,Correlated<RelationalExpression>
,PlanHashable
,PlannerGraphRewritable
,QueryPlan<FDBQueriedRecord<Message>>
,RecordQueryPlan
,RelationalExpression
- All Known Implementing Classes:
RecordQueryIndexPlan
,RecordQueryTextIndexPlan
@API(EXPERIMENTAL) public interface RecordQueryPlanWithIndex extends RecordQueryPlan
A query plan that uses a single index. This is usually by scanning the index in some way. This is meant for plans that directly use an index, such as theRecordQueryIndexPlan
. Plans that use an index but only through one of their child plans will not implement this interface.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.apple.foundationdb.record.query.plan.temp.Correlated
Correlated.BoundEquivalence
-
Nested classes/interfaces inherited from interface com.apple.foundationdb.record.PlanHashable
PlanHashable.PlanHashKind
-
Nested classes/interfaces inherited from interface com.apple.foundationdb.record.query.plan.temp.RelationalExpression
RelationalExpression.CombineFunction<R,S>, RelationalExpression.CombinePredicate
-
-
Field Summary
-
Fields inherited from interface com.apple.foundationdb.record.query.plan.plans.QueryPlan
UNKNOWN_MAX_CARDINALITY
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description PlannerGraph
createIndexPlannerGraph(RecordQueryPlan identity, NodeInfo nodeInfo, List<String> additionalDetails, Map<String,Attribute> additionalAttributeMap)
Create an planner graph for this index scan.default <M extends Message>
RecordCursor<FDBQueriedRecord<M>>execute(FDBRecordStoreBase<M> store, EvaluationContext context, byte[] continuation, ExecuteProperties executeProperties)
Execute this query plan.<M extends Message>
RecordCursor<IndexEntry>executeEntries(FDBRecordStoreBase<M> store, EvaluationContext context, byte[] continuation, ExecuteProperties executeProperties)
String
getIndexName()
Gets the name of the index used by this plan.IndexScanType
getScanType()
default PlannerGraph
rewritePlannerGraph(List<? extends PlannerGraph> childGraphs)
Rewrite the planner graph for better visualization of a query index plan.-
Methods inherited from interface com.apple.foundationdb.record.query.plan.temp.Correlated
getCorrelatedTo, rebase
-
Methods inherited from interface com.apple.foundationdb.record.PlanHashable
planHash, planHash
-
Methods inherited from interface com.apple.foundationdb.record.query.plan.plans.QueryPlan
execute, execute, getComplexity, getUsedIndexes, hasFullRecordScan, hasIndexScan, hasLoadBykeys, hasRecordScan, isReverse, isStrictlySorted, logPlanStructure, maxCardinality, strictlySorted
-
Methods inherited from interface com.apple.foundationdb.record.query.plan.plans.RecordQueryPlan
accept, execute, execute, execute, getAvailableFields, getChildren, getQueryPlanChildren, structuralEquals, structuralEquals, structuralHashCode
-
Methods inherited from interface com.apple.foundationdb.record.query.plan.temp.RelationalExpression
acceptPropertyVisitor, adjustMatch, bindIdentities, bindTo, canCorrelate, compensate, enumerateUnboundCorrelatedTo, equalsWithoutChildren, exactlySubsumedBy, findMatches, getQuantifiers, getResultValues, hashCodeWithoutChildren, hasIncompatibleBoundQuantifiers, hasUnboundQuantifiers, match, match, semanticEquals, semanticEquals, semanticHashCode, show, subsumedBy
-
-
-
-
Method Detail
-
getIndexName
@Nonnull String getIndexName()
Gets the name of the index used by this plan.- Returns:
- the name of the index used by this plan
-
getScanType
@Nonnull IndexScanType getScanType()
-
executeEntries
@Nonnull <M extends Message> RecordCursor<IndexEntry> executeEntries(@Nonnull FDBRecordStoreBase<M> store, @Nonnull EvaluationContext context, @Nullable byte[] continuation, @Nonnull ExecuteProperties executeProperties)
-
execute
@Nonnull default <M extends Message> RecordCursor<FDBQueriedRecord<M>> execute(@Nonnull FDBRecordStoreBase<M> store, @Nonnull EvaluationContext context, @Nullable byte[] continuation, @Nonnull ExecuteProperties executeProperties)
Description copied from interface:RecordQueryPlan
Execute this query plan.- Specified by:
execute
in interfaceRecordQueryPlan
- Type Parameters:
M
- type used to represent stored records- Parameters:
store
- record store from which to fetch recordscontext
- evaluation context containing parameter bindingscontinuation
- continuation from a previous execution of this same planexecuteProperties
- limits on execution- Returns:
- a cursor of records that match the query criteria
-
rewritePlannerGraph
@Nonnull default PlannerGraph rewritePlannerGraph(@Nonnull List<? extends PlannerGraph> childGraphs)
Rewrite the planner graph for better visualization of a query index plan.- Specified by:
rewritePlannerGraph
in interfacePlannerGraphRewritable
- Parameters:
childGraphs
- planner graphs of children expression that already have been computed- Returns:
- the rewritten planner graph that models the index as a separate node that is connected to the actual index scan plan node.
-
createIndexPlannerGraph
@Nonnull PlannerGraph createIndexPlannerGraph(@Nonnull RecordQueryPlan identity, @Nonnull NodeInfo nodeInfo, @Nonnull List<String> additionalDetails, @Nonnull Map<String,Attribute> additionalAttributeMap)
Create an planner graph for this index scan. Note that this method allows for composition with the covering index scan path. It is called byrewritePlannerGraph(java.util.List<? extends com.apple.foundationdb.record.query.plan.temp.explain.PlannerGraph>)
to create the subgraph but allows for greater flexibility and parameterization of the constituent parts.- Parameters:
identity
- identity of the node representing the index scan, may bethis
or some other plan objectnodeInfo
- node info to determine the actul flavor of index scanadditionalDetails
- additional details to be kept with the index scan nodeadditionalAttributeMap
- additional attributes to be kept with the index scan node- Returns:
- a new planner graph representing the index scan
-
-