public void setNumFields(int numFields) {
    if (fields.length != numFields) {
      Object[] oldFields = fields;
      fields = new Object[numFields];
      System.arraycopy(oldFields, 0, fields, 0,
          Math.min(oldFields.length, numFields));
    }
  }
Change the number of fields in the struct. No effect if the number of
fields is the same. The old field values are copied to the new array.
@param numFields the new number of fields
ql/src/java/org/apache/hadoop/hive/ql/io/orc/OrcStruct.java