@Override
  public void setValue(String val, int len) {
    super.setValue(HiveBaseChar.getPaddedValue(val, len), -1);
  }
Set char value, padding or truncating the value to the size of len parameter.
common/src/java/org/apache/hadoop/hive/common/type/HiveChar.java