Interface RecordQueryPlanWithChild
-
- All Superinterfaces:
Bindable
,Correlated<RelationalExpression>
,PlanHashable
,PlannerGraphRewritable
,QueryPlan<FDBQueriedRecord<Message>>
,RecordQueryPlan
,RecordQueryPlanWithChildren
,RelationalExpression
,RelationalExpressionWithChildren
- All Known Implementing Classes:
RecordQueryFetchFromPartialRecordPlan
,RecordQueryFilterPlan
,RecordQueryInJoinPlan
,RecordQueryInParameterJoinPlan
,RecordQueryInValuesJoinPlan
,RecordQueryPredicateFilterPlan
,RecordQueryScoreForRankPlan
,RecordQueryTypeFilterPlan
,RecordQueryUnorderedDistinctPlan
,RecordQueryUnorderedPrimaryKeyDistinctPlan
@API(EXPERIMENTAL) public interface RecordQueryPlanWithChild extends RecordQueryPlanWithChildren
A query plan with a single child plan.
-
-
Nested Class Summary
-
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 default AvailableFields
getAvailableFields()
RecordQueryPlan
getChild()
default List<RecordQueryPlan>
getChildren()
Returns the (zero or more)RecordQueryPlan
children of this plan.default int
getRelationalChildCount()
default Set<String>
getUsedIndexes()
Returns a set of names of the indexes used by this plan (and its sub-plans).default boolean
hasFullRecordScan()
Indicates whether this plan (or one of its components) must perform a scan over all records in the store directly rather than going through a secondary index.default boolean
hasIndexScan(String indexName)
Indicates whether this plan scans the given index.default boolean
hasLoadBykeys()
Indicates whether this plan (or one of its components) loads records by their primary key.default boolean
hasRecordScan()
Indicates whether this plan (or one of its components) scans at least a subset of the record range directly rather than going through a secondary index.default int
maxCardinality(RecordMetaData metaData)
Indicates how many records this plan could possibly return.-
Methods inherited from interface com.apple.foundationdb.record.PlanHashable
planHash, planHash
-
Methods inherited from interface com.apple.foundationdb.record.query.plan.temp.explain.PlannerGraphRewritable
rewritePlannerGraph
-
Methods inherited from interface com.apple.foundationdb.record.query.plan.plans.QueryPlan
execute, execute, getComplexity, isReverse, logPlanStructure
-
Methods inherited from interface com.apple.foundationdb.record.query.plan.plans.RecordQueryPlan
accept, execute, execute, execute, execute, getQueryPlanChildren, structuralEquals, structuralEquals, structuralHashCode
-
Methods inherited from interface com.apple.foundationdb.record.query.plan.temp.RelationalExpression
acceptPropertyVisitor, bindIdentities, bindTo, canCorrelate, enumerateUnboundCorrelatedTo, equalsWithoutChildren, findMatches, getQuantifiers, hashCodeWithoutChildren, match, semanticEquals, semanticEquals, semanticHashCode, show
-
Methods inherited from interface com.apple.foundationdb.record.query.plan.temp.expressions.RelationalExpressionWithChildren
getCorrelatedTo, getCorrelatedToWithoutChildren, rebase, rebaseWithRebasedQuantifiers
-
-
-
-
Method Detail
-
getChildren
@Nonnull default List<RecordQueryPlan> getChildren()
Description copied from interface:RecordQueryPlan
Returns the (zero or more)RecordQueryPlan
children of this plan.Warning: This part of the API is undergoing active development. At some point in the future, the return type of this method will change to allow it to return a list of generic
QueryPlan
s. At current, everyRecordQueryPlan
can only have otherRecordQueryPlan
s as children. However, this is not guaranteed to be the case in the future. This method has been marked asAPI.Status.UNSTABLE
as of version 2.5.- Specified by:
getChildren
in interfaceRecordQueryPlan
- Returns:
- the child plans
-
getChild
RecordQueryPlan getChild()
-
getRelationalChildCount
default int getRelationalChildCount()
- Specified by:
getRelationalChildCount
in interfaceRelationalExpressionWithChildren
-
hasRecordScan
default boolean hasRecordScan()
Description copied from interface:QueryPlan
Indicates whether this plan (or one of its components) scans at least a subset of the record range directly rather than going through a secondary index. A plan may only scan over a subset of all records. Someone might not use any secondary indexes explicitly, but they might make use of the primary key index. For example, if they had a compound primary key, and they issued a query for all records that had some value for the first element of their primary key, the planner will produce a plan which scans over a subset of all records.- Specified by:
hasRecordScan
in interfaceQueryPlan<FDBQueriedRecord<Message>>
- Specified by:
hasRecordScan
in interfaceRecordQueryPlanWithChildren
- Returns:
true
if this plan (or one of its components) scans at least a subset of the records directly
-
hasFullRecordScan
default boolean hasFullRecordScan()
Description copied from interface:QueryPlan
Indicates whether this plan (or one of its components) must perform a scan over all records in the store directly rather than going through a secondary index. SeehasRecordScan
for the comparison between two methods.- Specified by:
hasFullRecordScan
in interfaceQueryPlan<FDBQueriedRecord<Message>>
- Specified by:
hasFullRecordScan
in interfaceRecordQueryPlanWithChildren
- Returns:
true
if this plan (or one of its components) must perform a scan over all records in the store directly
-
hasIndexScan
default boolean hasIndexScan(@Nonnull String indexName)
Description copied from interface:QueryPlan
Indicates whether this plan scans the given index.- Specified by:
hasIndexScan
in interfaceQueryPlan<FDBQueriedRecord<Message>>
- Specified by:
hasIndexScan
in interfaceRecordQueryPlanWithChildren
- Parameters:
indexName
- the name of the index to check for- Returns:
true
if this plan (or one of its children) scans the given index
-
getUsedIndexes
@Nonnull default Set<String> getUsedIndexes()
Description copied from interface:QueryPlan
Returns a set of names of the indexes used by this plan (and its sub-plans).- Specified by:
getUsedIndexes
in interfaceQueryPlan<FDBQueriedRecord<Message>>
- Specified by:
getUsedIndexes
in interfaceRecordQueryPlanWithChildren
- Returns:
- an set of indexes used by this plan
-
maxCardinality
default int maxCardinality(@Nonnull RecordMetaData metaData)
Description copied from interface:QueryPlan
Indicates how many records this plan could possibly return.- Specified by:
maxCardinality
in interfaceQueryPlan<FDBQueriedRecord<Message>>
- Parameters:
metaData
- meta-data to use to determine things like index uniqueness- Returns:
- the maximum number of records or
QueryPlan.UNKNOWN_MAX_CARDINALITY
if not known
-
hasLoadBykeys
default boolean hasLoadBykeys()
Description copied from interface:QueryPlan
Indicates whether this plan (or one of its components) loads records by their primary key.- Specified by:
hasLoadBykeys
in interfaceQueryPlan<FDBQueriedRecord<Message>>
- Specified by:
hasLoadBykeys
in interfaceRecordQueryPlanWithChildren
- Returns:
true
if this plan (or one of its components) loads records by their primary key
-
getAvailableFields
@Nonnull default AvailableFields getAvailableFields()
- Specified by:
getAvailableFields
in interfaceRecordQueryPlan
-
-