@Override
  public <T> void set(int pos, T value) {
    switch (pos) {
      case 0:
        this.partition = (StructLike) value;
        break;
      case 1:
        this.specId = (Integer) value;
        break;
      case 2:
        this.dataRecordCount = (Long) value;
        break;
      case 3:
        this.dataFileCount = (Integer) value;
        break;
      case 4:
        this.totalDataFileSizeInBytes = (Long) value;
        break;
      case 5:
        // optional field as per spec, implementation initialize to 0 for counters
        this.positionDeleteRecordCount = value == null ? 0L : (Long) value;
        break;
      case 6:
        // optional field as per spec, implementation initialize to 0 for counters
        this.positionDeleteFileCount = value == null ? 0 : (Integer) value;
        break;
      case 7:
        // optional field as per spec, implementation initialize to 0 for counters
        this.equalityDeleteRecordCount = value == null ? 0L : (Long) value;
        break;
      case 8:
        // optional field as per spec, implementation initialize to 0 for counters
        this.equalityDeleteFileCount = value == null ? 0 : (Integer) value;
        break;
      case 9:
        // optional field as per spec, implementation initialize to 0 for counters
        this.totalRecordCount = value == null ? 0L : (Long) value;
        break;
      case 10:
        this.lastUpdatedAt = (Long) value;
        break;
      case 11:
        this.lastUpdatedSnapshotId = (Long) value;
        break;
      default:
        throw new UnsupportedOperationException("Unknown position: " + pos);
    }
  }
Appends statistics from given entry to current entry.

@param entry the entry from which statistics will be sourced.
iceberg/patched-iceberg-core/src/main/java/org/apache/iceberg/PartitionStats.java