Package org.apache.calcite.rel.metadata
Class RelMdPredicates.JoinConditionBasedPredicateInference.ExprsItr
- java.lang.Object
-
- org.apache.calcite.rel.metadata.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 Summary
Fields Modifier and Type Field Description (package private) int[]
columns
(package private) java.util.BitSet[]
columnSets
(package private) boolean
firstCall
(package private) int[]
iterationIdx
(package private) Mapping
nextMapping
-
Constructor Summary
Constructors Constructor Description ExprsItr(ImmutableBitSet fields)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
computeNextMapping(int level)
boolean
hasNext()
private void
initializeMapping()
Mapping
next()
void
remove()
-
-
-
Field Detail
-
columns
final int[] columns
-
columnSets
final java.util.BitSet[] columnSets
-
iterationIdx
final int[] iterationIdx
-
nextMapping
Mapping nextMapping
-
firstCall
boolean firstCall
-
-
Constructor Detail
-
ExprsItr
ExprsItr(ImmutableBitSet fields)
-
-
Method Detail
-
hasNext
public boolean hasNext()
- Specified by:
hasNext
in interfacejava.util.Iterator<Mapping>
-
remove
public void remove()
- Specified by:
remove
in interfacejava.util.Iterator<Mapping>
-
computeNextMapping
private void computeNextMapping(int level)
-
initializeMapping
private void initializeMapping()
-
-