@SuppressWarnings("unchecked")
  @Override
  public int encodedLength(Object[] val) {
    assert fields.length >= val.length;
    int sum = 0;
    for (int i = 0; i < val.length; i++) {
      sum += fields[i].encodedLength(val[i]);
    }
    return sum;
  }
Create a new {@code Struct} instance defined as the sequence of {@code HDataType}s in
{@code memberTypes}.
<p>
A {@code Struct} is {@code orderPreserving} when all of its fields are {@code orderPreserving}.
A {@code Struct} is {@code skippable} when all of its fields are {@code skippable}.
</p>
hbase-common/src/main/java/org/apache/hadoop/hbase/types/Struct.java