@Override
    public int compare(StructLike o1, StructLike o2) {
      if (o1 instanceof StructProjection && o2 instanceof StructProjection) {
        int cmp =
            Integer.compare(
                ((StructProjection) o1).projectedFields(),
                ((StructProjection) o2).projectedFields());
        if (cmp != 0) {
          return cmp;
        }
      }
      return comparator.compare(o1, o2);
    }
A {@link Table} implementation that exposes a table's partitions as rows.
iceberg/patched-iceberg-core/src/main/java/org/apache/iceberg/PartitionsTable.java