protected void func(BytesColumnVector outV, byte[][] vector, int[] start, int[] length, int i) {
    StringExpr.rightTrimAndTruncate(outV, i, vector[i], start[i], length[i], maxLength);
  }
Do right trim and truncate for CHAR.
ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/CastStringGroupToChar.java