@Override
    public Void bucket(int fieldId, String sourceName, int sourceId, int numBuckets) {
      // the column with highest cardinality is usually the one with the highest number of buckets
      if (numBuckets > highestNumBuckets) {
        this.highestNumBuckets = numBuckets;
        this.bucketColumn = sourceName;
      }
      builder.asc(Expressions.bucket(sourceName, numBuckets));
      return null;
    }
Create a sort order that will group data for a partition spec.

<p>If the partition spec contains bucket columns, the sort order will also have a field to sort
by a column that is bucketed in the spec. The column is selected by the highest number of
buckets in the transform.

@param spec a partition spec
@return a sort order that will cluster data for the spec
iceberg/patched-iceberg-core/src/main/java/org/apache/iceberg/Partitioning.java