public static List<String> getPrimaryKeys(MixedTable table) {
    if (table.isUnkeyedTable()) {
      return Collections.emptyList();
    }
    return table.asKeyedTable().primaryKeySpec().fields().stream()
        .map(PrimaryKeySpec.PrimaryKeyField::fieldName)
        .collect(Collectors.toList());
  }
An util that loads mixed-format table, build mixed-format log writer and so on.
amoro-format-mixed/amoro-mixed-flink/amoro-mixed-flink-common/src/main/java/org/apache/amoro/flink/util/MixedFormatUtils.java