Class ExplodeExpression

    • Method Detail

      • getQuantifiers

        @Nonnull
        public List<? extends Quantifier> getQuantifiers()
        Description copied from interface: RelationalExpression
        Return an iterator of references to the children of this planner expression. The iterators returned by different calls are guaranteed to be independent (i.e., advancing one will not advance another). However, they might point to the same object, as when Collections.emptyIterator() is returned. The returned iterator should be treated as an immutable object and may throw an exception if Iterator.remove() is called. The iterator must return its elements in a consistent order.
        Specified by:
        getQuantifiers in interface RelationalExpression
        Returns:
        an iterator of references to the children of this planner expression
      • rebase

        @Nonnull
        public ExplodeExpression rebase​(@Nonnull
                                        AliasMap translationMap)
        Description copied from interface: Correlated
        Rebases this and all other objects this objects is composed of using a given translation map.
        Specified by:
        rebase in interface Correlated<RelationalExpression>
        Parameters:
        translationMap - a map defining a translation from CorrelationIdentifiers ids to CorrelationIdentifiers ids'. After the rebase, every correlation to an id contained ids that is contained or referred to directly or indirectly by this must have been transformed to use the mapped counterpart of id id' in ids'. IDs not contained in the translation map must remain unmodified by the rebase operation.
        Returns:
        a new entity that has been rebased
      • subsumedBy

        @Nonnull
        public Iterable<MatchInfo> subsumedBy​(@Nonnull
                                              RelationalExpression candidateExpression,
                                              @Nonnull
                                              AliasMap aliasMap,
                                              @Nonnull
                                              IdentityBiMap<Quantifier,​PartialMatch> partialMatchMap)
        Description copied from interface: RelationalExpression
        Try to establish if otherExpression subsumes this one. If two expression are semantically equal (e.g. in structure or by other means of reasoning) they should exactly return the same records. There are use cases where semantic equality is too strict and not that useful. During index matching we don't necessarily need to know if two expressions produce the same result, we just need to know that the candidate scan produces a (non-proper) super multiset of records (the candidate therefore includes all records warranted by the query) and we can match query against that candidate. The difference between result set produced by the candidate and the query then must be corrected by applying compensation. The following tautologies apply:
        • If query and candidate are semantically equivalent, the query side should match to the candidate side without any compensation. In other words the query expression can simply be replaced by the candidate expression.
        • If the candidate is matched and we decide to rewrite this query expression with the appropriate top expression on the candidate side then it holds that the query expression is equivalent to the computed compensation of the match over the candidate scan.
        • A query cannot match to a candidate if it cannot be proven that the candidate cannot at least produce all the records that the query may produce.
        Specified by:
        subsumedBy in interface RelationalExpression
        Parameters:
        candidateExpression - the candidate expression
        aliasMap - a map of alias defining the equivalence between aliases and therefore quantifiers
        partialMatchMap - a map from quantifier to a PartialMatch that pulled up along that quantifier from one of the expressions below that quantifier
        Returns:
        an iterable of MatchInfos if subsumption between this expression and the candidate expression can be established
      • rewriteInternalPlannerGraph

        @Nonnull
        public PlannerGraph rewriteInternalPlannerGraph​(@Nonnull
                                                        List<? extends PlannerGraph> childGraphs)
        Description copied from interface: InternalPlannerGraphRewritable
        Method to rewrite the planner graph.
        Specified by:
        rewriteInternalPlannerGraph in interface InternalPlannerGraphRewritable
        Parameters:
        childGraphs - planner graphs of children expression that already have been computed
        Returns:
        a new planner graph that can combine the childGraphs in a meaningful way. Note that there is no obligation to use the childGraphs at all, this method can create a new independent planner graph completely from scratch.