public boolean equals(Object rhs) {
    if (rhs == this) {
      return true;
    }
    if (rhs == null || rhs.getClass() != getClass()) {
      return false;
    }
    return this.getStrippedValue().equals(((HiveCharWritable) rhs).getStrippedValue());
  }
HiveCharWritable.
String values will be padded to full char length.
Character length, comparison, hashCode should ignore trailing spaces.
serde/src/java/org/apache/hadoop/hive/serde2/io/HiveCharWritable.java