Class PartialMatch
- java.lang.Object
-
- com.apple.foundationdb.record.query.plan.temp.PartialMatch
-
public class PartialMatch extends Object
Case class to represent a partial match. A partial match is stored in a multi map inGroupExpressionRef
s that are part of a query graph. A partial match is never stored in aGroupExpressionRef
of a match candidate. A partial match establishes the a relation ships between a referenceref1
in a query graph and a referenceref2
in a match candidate. It should be interpreted as there is a partial match betweenref1
andref2
ifref1
is result-equivalent toref2'
under the bindings in the alias map returned by (getBoundAliasMap()
) whereref2'
is obtained by is applying compensation toref2
. If there is no compensation this simplifies to: there is a partial match betweenref1
andref2
ifref1
is result-equivalent toref2
under the bindings in the alias map returned by (getBoundAliasMap()
). It is the task of a matching algorithm (seeCascadesPlanner
) to establishPartialMatch
es between query graph and match candidate graphs. Once there is a partial match for the top-most reference in the match candidate, we can replace the reference on the query graph side with a scan over the match candidate's materialized version (e.g. an index) and subsequent compensation.
-
-
Constructor Summary
Constructors Constructor Description PartialMatch(AliasMap boundAliasMap, ExpressionRef<? extends RelationalExpression> queryRef, ExpressionRef<? extends RelationalExpression> candidateRef, UnaryOperator<ExpressionRef<? extends RelationalExpression>> compensationOperator)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AliasMap
getBoundAliasMap()
ExpressionRef<? extends RelationalExpression>
getCandidateRef()
UnaryOperator<ExpressionRef<? extends RelationalExpression>>
getCompensationOperator()
ExpressionRef<? extends RelationalExpression>
getQueryRef()
-
-
-
Constructor Detail
-
PartialMatch
public PartialMatch(@Nonnull AliasMap boundAliasMap, @Nonnull ExpressionRef<? extends RelationalExpression> queryRef, @Nonnull ExpressionRef<? extends RelationalExpression> candidateRef, @Nonnull UnaryOperator<ExpressionRef<? extends RelationalExpression>> compensationOperator)
-
-
Method Detail
-
getQueryRef
@Nonnull public ExpressionRef<? extends RelationalExpression> getQueryRef()
-
getCandidateRef
@Nonnull public ExpressionRef<? extends RelationalExpression> getCandidateRef()
-
getCompensationOperator
@Nonnull public UnaryOperator<ExpressionRef<? extends RelationalExpression>> getCompensationOperator()
-
-