Class ValueIndexExpansionVisitor
- java.lang.Object
-
- com.apple.foundationdb.record.query.plan.temp.ValueIndexLikeExpansionVisitor
-
- com.apple.foundationdb.record.query.plan.temp.ValueIndexExpansionVisitor
-
- All Implemented Interfaces:
ExpansionVisitor<ValueIndexLikeExpansionVisitor.VisitorState>
,KeyExpressionVisitor<ValueIndexLikeExpansionVisitor.VisitorState,GraphExpansion>
public class ValueIndexExpansionVisitor extends ValueIndexLikeExpansionVisitor
Class to expand value index access into a candidate graph. The visitation methods are left unchanged from the super classValueIndexLikeExpansionVisitor
, this class merely provides a specificexpand(com.apple.foundationdb.record.query.plan.temp.Quantifier.ForEach, com.apple.foundationdb.record.metadata.expressions.KeyExpression, boolean)
method.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.apple.foundationdb.record.query.plan.temp.ValueIndexLikeExpansionVisitor
ValueIndexLikeExpansionVisitor.VisitorState
-
Nested classes/interfaces inherited from interface com.apple.foundationdb.record.query.plan.temp.KeyExpressionVisitor
KeyExpressionVisitor.Result, KeyExpressionVisitor.State
-
-
Constructor Summary
Constructors Constructor Description ValueIndexExpansionVisitor(Index index)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description MatchCandidate
expand(Quantifier.ForEach baseQuantifier, KeyExpression primaryKey, boolean isReverse)
Method that expands a data structure into a data flow graphstatic KeyExpression
fullKey(Index index, KeyExpression primaryKey)
Compute the full key of an index (given that the index is a value index).-
Methods inherited from class com.apple.foundationdb.record.query.plan.temp.ValueIndexLikeExpansionVisitor
getCurrentState, pop, pop, push, visitExpression, visitExpression, visitExpression, visitExpression, visitExpression, visitExpression, visitExpression
-
-
-
-
Method Detail
-
expand
@Nonnull public MatchCandidate expand(@Nonnull Quantifier.ForEach baseQuantifier, @Nullable KeyExpression primaryKey, boolean isReverse)
Description copied from interface:ExpansionVisitor
Method that expands a data structure into a data flow graph- Parameters:
baseQuantifier
- a quantifier representing the base data accessprimaryKey
- the primary key of the data object the caller wants to accessisReverse
- an indicator whether the result set is expected to be returned in reverse order- Returns:
- a new
MatchCandidate
that can be used for matching.
-
fullKey
@Nonnull public static KeyExpression fullKey(@Nonnull Index index, @Nullable KeyExpression primaryKey)
Compute the full key of an index (given that the index is a value index).- Parameters:
index
- index to be expandedprimaryKey
- primary key of the records the index ranges over. The primary key is used to determine parts in the index definition that already contain parts of the primary key. All primary key components that are not already part of the index key are appended to the index key.- Returns:
- a
KeyExpression
describing the full index key as stored
-
-