Class PartialMatch

  • All Implemented Interfaces:
    Bindable

    public class PartialMatch
    extends Object
    implements Bindable
    Case class to represent a partial match. A partial match is stored in a multi map in GroupExpressionRefs that are part of a query graph. A partial match is never stored in a GroupExpressionRef of a match candidate. A partial match establishes the a relation ships between a reference ref1 in a query graph and a reference ref2 in a match candidate. It should be interpreted as there is a partial match between ref1 and ref2 if ref1 is result-equivalent to ref2' under the bindings in the alias map returned by (getBoundAliasMap()) where ref2' is obtained by is applying compensation to ref2. If there is no compensation this simplifies to: there is a partial match between ref1 and ref2 if ref1 is result-equivalent to ref2 under the bindings in the alias map returned by (getBoundAliasMap()). It is the task of a matching algorithm (see CascadesPlanner) to establish PartialMatches 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.