private boolean isAlwaysTrue(RexNode predicate) {
      if (predicate instanceof RexCall) {
        RexCall c = (RexCall) predicate;
        if (c.getOperator().getKind() == SqlKind.EQUALS) {
          int lPos = pos(c.getOperands().get(0));
          int rPos = pos(c.getOperands().get(1));
          return lPos != -1 && lPos == rPos;
        }
      }
      return predicate.isAlwaysTrue();
    }
Given an expression returns all the possible substitutions.

<p>For example, for an expression 'a + b + c' and the following
equivalences: <pre>
a : {a, b}
b : {a, b}
c : {c, e}
</pre>

<p>The following Mappings will be returned:
<pre>
{a &rarr; a, b &rarr; a, c &rarr; c}
{a &rarr; a, b &rarr; a, c &rarr; e}
{a &rarr; a, b &rarr; b, c &rarr; c}
{a &rarr; a, b &rarr; b, c &rarr; e}
{a &rarr; b, b &rarr; a, c &rarr; c}
{a &rarr; b, b &rarr; a, c &rarr; e}
{a &rarr; b, b &rarr; b, c &rarr; c}
{a &rarr; b, b &rarr; b, c &rarr; e}
</pre>

<p>which imply the following inferences:
<pre>
a + a + c
a + a + e
a + b + c
a + b + e
b + a + c
b + a + e
b + b + c
b + b + e
</pre>
ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/stats/HiveRelMdPredicates.java