@Override
    public boolean equals(Object o) {
      if (o instanceof RexNodeRef) {
        RexNodeRef otherRef = (RexNodeRef) o;
        return node.toString().equals(otherRef.node.toString());
      }
      return false;
    }
This class just wraps around a RexNode enables equals/hashCode based on toString.

After CALCITE-2632 this might not be needed anymore
ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/rules/HivePointLookupOptimizerRule.java