Class RelMdPredicates.JoinConditionBasedPredicateInference.ExprsItr

  • All Implemented Interfaces:
    java.util.Iterator<Mapping>
    Enclosing class:
    RelMdPredicates.JoinConditionBasedPredicateInference

    class RelMdPredicates.JoinConditionBasedPredicateInference.ExprsItr
    extends java.lang.Object
    implements java.util.Iterator<Mapping>
    Given an expression returns all the possible substitutions.

    For example, for an expression 'a + b + c' and the following equivalences:

     a : {a, b}
     b : {a, b}
     c : {c, e}
     

    The following Mappings will be returned:

     {a → a, b → a, c → c}
     {a → a, b → a, c → e}
     {a → a, b → b, c → c}
     {a → a, b → b, c → e}
     {a → b, b → a, c → c}
     {a → b, b → a, c → e}
     {a → b, b → b, c → c}
     {a → b, b → b, c → e}
     

    which imply the following inferences:

     a + a + c
     a + a + e
     a + b + c
     a + b + e
     b + a + c
     b + a + e
     b + b + c
     b + b + e
     
    • Field Detail

      • columns

        final int[] columns
      • columnSets

        final java.util.BitSet[] columnSets
      • iterationIdx

        final int[] iterationIdx
      • firstCall

        boolean firstCall
    • Method Detail

      • hasNext

        public boolean hasNext()
        Specified by:
        hasNext in interface java.util.Iterator<Mapping>
      • next

        public Mapping next()
        Specified by:
        next in interface java.util.Iterator<Mapping>
      • remove

        public void remove()
        Specified by:
        remove in interface java.util.Iterator<Mapping>
      • computeNextMapping

        private void computeNextMapping​(int level)
      • initializeMapping

        private void initializeMapping()