public static ShuffleHelper build(MixedTable table, Schema schema, RowType rowType) {
    PartitionKey partitionKey = null;

    if (table.spec() != null && !CollectionUtil.isNullOrEmpty(table.spec().fields())) {
      partitionKey = new PartitionKey(projectPartition(table.spec(), schema), schema);
    }
    schema = addFieldsNotInMixedFormat(schema, rowType);

    if (table.isUnkeyedTable()) {
      return new ShuffleHelper(rowType, schema.asStruct(), partitionKey);
    }

    KeyedTable keyedTable = table.asKeyedTable();
    PrimaryKeyData primaryKeyData = new PrimaryKeyData(keyedTable.primaryKeySpec(), schema);
    return new ShuffleHelper(
        keyedTable.primaryKeySpec().primaryKeyExisted(),
        primaryKeyData,
        partitionKey,
        rowType,
        schema.asStruct());
  }
This helper operates to one mixed-format table and the data of the table.
amoro-format-mixed/amoro-mixed-flink/amoro-mixed-flink-common/src/main/java/org/apache/amoro/flink/shuffle/ShuffleHelper.java