Package com.apple.foundationdb.record.query.plan.temp
This will contain design docs for the Cascades planner at some point.
-
Interface Summary Interface Description Bindable A planner type that supports rule binding.CascadesPlanner.Task Represents actual tasks in the task stack of the planner.Compensation Interface for all kinds of compensation.Compensation.WithPredicateCompensation Correlated<S extends Correlated<S>> A correlated entity is one which can only be evaluated as a function of some input (usually aQuantifier
from its relational parent).EnumeratingIterable<T> Iterable that provides special iterators of typeEnumeratingIterator
.EnumeratingIterator<T> An iterator extendingIterator
providing the ability to skip a certain prefix.ExpansionVisitor<S extends KeyExpressionVisitor.State> A sub interface ofKeyExpressionVisitor
that fixes the return type to be aGraphExpansion
and adds an API to cause the expansion of a metadata-based data access structure to a data flow graph that can then be used for matching.ExpressionRef<T extends RelationalExpression> This interface is used mostly as an (admittedly surmountable) barrier to rules mutating bound references directly, which is undefined behavior.KeyExpressionVisitor<S extends KeyExpressionVisitor.State,R extends KeyExpressionVisitor.Result> An interface to provide a state-based visitor pattern that can traverse a tree ofKeyExpression
s.KeyExpressionVisitor.Result Tag interface to capture the result being returned by visitation methods of this visitor.KeyExpressionVisitor.State Tag interface to capture state within this visitor.MatchCandidate Interface to represent a match candidate.PlanContext A basic context object that stores all of the metadata about a record store, such as the available indexes.PlannerProperty<T> An interface for certain Cascades-style properties, which are measurable features of an expression other than the structure of the expression tree.PlannerRuleCall APlannerRuleCall
is a context object that supports a single application of a rule to a particular expression.PredicateMultiMap.ReapplyPredicateFunction Functional interface to reapply a predicate if necessary.RelationalExpression A relational expression is aRelationalExpression
that represents a stream of records.RelationalExpression.CombineFunction<R,S> A functional interface to combine the matches computed over pairs of quantifiers during matching into a result (for the bound correlatedTo set handed intoRelationalExpression.CombineFunction.combine(com.apple.foundationdb.record.query.plan.temp.AliasMap, java.lang.Iterable<com.apple.foundationdb.record.query.plan.temp.matching.BoundMatch<com.apple.foundationdb.record.query.plan.temp.EnumeratingIterable<R>>>)
).RelationalExpression.CombinePredicate A functional interface to combine the matches computed over pairs of quantifiers during matching into a boolean result (for the bound correlatedTo set handed intoRelationalExpression.CombinePredicate.combine(com.apple.foundationdb.record.query.plan.temp.AliasMap, java.lang.Iterable<com.apple.foundationdb.record.query.plan.temp.AliasMap>)
).RelationalExpressionWithPredicate A (relational) expression that has a predicate on it. -
Class Summary Class Description AliasMap This class encapsulates mappings betweenCorrelationIdentifier
s and helpers to create and maintain these mappings.AliasMap.Builder Builder class for theAliasMap
.BoundKeyPart A key expression that can be bound by a comparison during graph matching.CascadesCostModel A comparator implementing the current heuristic cost model for theCascadesPlanner
.CascadesPlanner A Cascades-style query planner that converts aRecordQuery
to aRecordQueryPlan
, possibly using secondary indexes defined in aRecordMetaData
to execute the query efficiently.CascadesRuleCall A rule call implementation for theCascadesPlanner
.ChooseK Utility class to provide helpers related to enumeration of cross products.ComparisonRange A set of compatible comparisons on a single field of aKeyExpression
representing a contiguous range of values for that field.ComparisonRange.MergeResult Class to represent the outcome of a merge operation.Compensation.ForMatch Regular compensation class for matches based on query predicates.Correlated.BoundEquivalence Helper class to wrap extenders ofCorrelated
to provide standard equivalence and hash code functionality under a givenAliasMap
.CorrelationIdentifier A correlation identifier is an immutable object that is created with a string uniquely identifying it.CrossProduct Utility class to provide helpers related to enumeration of cross products.EnumeratingIterable.EmptyIterable<T> An implementation ofEnumeratingIterable
that is optimized to work for empty input sets.ExpressionRefTraversal Utility class to provide a graph view of a expression reference DAG given by a root expression reference (to aRelationalExpression
that allows to perform traversal operations that are normally not possible on instances ofExpressionRef
such asExpressionRefTraversal.getLeafReferences()
andExpressionRefTraversal.getParentRefs(com.apple.foundationdb.record.query.plan.temp.ExpressionRef<? extends com.apple.foundationdb.record.query.plan.temp.RelationalExpression>)
.ExpressionRefTraversal.ReferencePath Case class to hold information about the path from an expression to another expression reference.GraphExpansion Class to abstract behavior when query expansion is applied to query components or key expressions.GroupExpressionPrinter A utility class for printing out aGroupExpressionRef
in a readable form.GroupExpressionRef<T extends RelationalExpression> A Cascades-style group expression, representing the members of set ofRelationalExpression
s that belong to the same equivalence class.IdentityBiMap<K,V> BiMap based on identities of typesK
andV
.IterableHelpers Helper methods forIterable
s.KeyPart A key expression that can be bound by a comparison.MatchInfo This class represents the result of matching one expression against a candidate.MatchPartition Case class to represent a partition of partial matches.MessageValue A utility class for extracting data and meta-data from Protocol BufferMessage
s, as used in the Record Layer.MetaDataPlanContext APlanContext
where the underlying meta-data comes fromRecordMetaData
andRecordStoreState
objects, as is generally the case when planning actual queries.PartialMatch Case class to represent a partial match.PlannerRule<T extends Bindable> Classes that inherit fromPlannerRule
form the base of the Cascades planning system.PlannerRuleSet A set of rules for use by a planner that supports quickly finding rules that could match a given planner expression.PredicateMap Predicate map that enforces a constraint that a predicate can only be mapped to at most one candidate.PredicateMap.Builder Builder class for a predicate maps.PredicateMultiMap PredicateMultiMap.Builder Builder class for a predicate maps.PredicateMultiMap.PredicateMapping Mapping class.PrimaryAccessExpansionVisitor Class to expand primary data access into a candidate.PrimaryScanMatchCandidate Case class to represent a match candidate that is backed by an index.Quantifier Models the concept of quantification.Quantifier.Builder<Q extends Quantifier,B extends Quantifier.Builder<Q,B>> Builder class for quantifiers.Quantifier.Existential A quantifier that conceptually flows exactly one item containing a boolean to the owning expression indicating whether the sub-graph that the quantifier ranges over produced a non-empty or an empty result.Quantifier.Existential.ExistentialBuilder Builder subclass for existential quantifiers.Quantifier.ForEach A quantifier that conceptually flows one item at a time from the expression it ranges over to the owning expression.Quantifier.ForEach.ForEachBuilder Builder subclass to build for-each quantifiers..Quantifier.Physical Physical quantifier.Quantifier.Physical.PhysicalBuilder Builder subclass for physical quantifiers.Quantifiers Auxiliary class containing factory methods and helpers forQuantifier
.Quantifiers.AliasResolver Resolver to resolve aliases to quantifiers.RelationalExpressionPointerSet<T extends RelationalExpression> A set ofRelationalExpression
s that uses reference ("pointer") equality to determine equivalence for the purposes of set membership, rather than theObject.equals(Object)
method used by the JavaSet
interface.TopologicalSort Utility class to provide helpers related to topological sorts.TransitiveClosure Utility class to provide helpers related to the computation of the transitive closure of a partial order.ValueIndexExpansionVisitor Class to expand value index access into a candidate graph.ValueIndexLikeExpansionVisitor Expansion visitor that implements the shared logic between primary scan data access and value index access.ValueIndexLikeExpansionVisitor.VisitorState Class that holds the state necessary to expand both primary data access as well as value indexes.ValueIndexScanMatchCandidate Case class to represent a match candidate that is backed by an index. -
Enum Summary Enum Description ComparisonRange.Type Comparison ranges can be divided into three types, with distinct planning behaviour: Empty ranges, to which any comparison can be added. Equality ranges, to which only the same (equality) comparison can be added. Inequality ranges, to which any other comparison can be added. This behavior is defined inComparisonRange.tryToAdd(Comparisons.Comparison)
. -
Exception Summary Exception Description ExpressionRef.UngettableReferenceException An exception thrown whenExpressionRef.get()
is called on a reference that does not support it, such as a group reference.