@Override
  public TableMetadata create() {
    Map<String, String> properties = request.properties();
    Preconditions.checkArgument(
        TablePropertyUtil.isBaseStore(properties, TableFormat.MIXED_ICEBERG),
        "The table creation request must be base store of mixed-iceberg");

    PrimaryKeySpec keySpec =
        TablePropertyUtil.parsePrimaryKeySpec(request.schema(), request.properties());

    if (keySpec.primaryKeyExisted()) {
      TableIdentifier identifier = TableIdentifier.of(database, tableName);
      TableIdentifier changeIdentifier = TablePropertyUtil.parseChangeIdentifier(properties);
      String expectChangeStoreName =
          identifier.name() + InternalTableConstants.CHANGE_STORE_TABLE_NAME_SUFFIX;
      TableIdentifier expectChangeIdentifier =
          TableIdentifier.of(identifier.namespace(), expectChangeStoreName);
      Preconditions.checkArgument(
          expectChangeIdentifier.equals(changeIdentifier),
          "the change store identifier is not expected. expected: %s, but found %s",
          expectChangeIdentifier.toString(),
          changeIdentifier.toString());
    }

    TableMetadata metadata = super.create();
    metadata
        .getProperties()
        .put(InternalTableConstants.MIXED_ICEBERG_BASED_REST, Boolean.toString(true));
    if (!keySpec.primaryKeyExisted()) {
      return metadata;
    }

    Map<String, String> changeProperties = Maps.newHashMap(request.properties());
    changeProperties.putAll(
        TablePropertyUtil.changeStoreProperties(keySpec, TableFormat.MIXED_ICEBERG));
    String changeTableLocation = metadata.getTableLocation() + "/change";
    org.apache.iceberg.TableMetadata changeMetadata =
        org.apache.iceberg.TableMetadata.newTableMetadata(
            icebergMetadata.schema(),
            icebergMetadata.spec(),
            icebergMetadata.sortOrder(),
            changeTableLocation,
            changeProperties);
    String changeMetadataFileLocation =
        InternalTableUtil.genNewMetadataFileLocation(null, changeMetadata);
    metadata
        .getProperties()
        .put(
            InternalTableConstants.CHANGE_STORE_PREFIX
                + InternalTableConstants.PROPERTIES_METADATA_LOCATION,
            changeMetadataFileLocation);
    metadata.setChangeLocation(changeTableLocation);
    metadata.setPrimaryKey(keySpec.description());

    OutputFile changeStoreFile = io.newOutputFile(changeMetadataFileLocation);
    this.changMetadataFileLocation = changeMetadataFileLocation;
    TableMetadataParser.overwrite(changeMetadata, changeStoreFile);
    return metadata;
  }
Table creator for mixed-iceberg format
amoro-ams/src/main/java/org/apache/amoro/server/table/internal/InternalMixedIcebergCreator.java