private static void validatePKConstraints(
            ObjectIdentifier tableName, CatalogTable catalogTable, Format format) {
        if (catalogTable.getSchema().getPrimaryKey().isPresent()
                && format.getChangelogMode().containsOnly(RowKind.INSERT)) {
            Configuration options = Configuration.fromMap(catalogTable.getOptions());
            String formatName = options.getOptional(FORMAT).orElse(options.get(FORMAT));
            throw new ValidationException(String.format(
                    "The TubeMQ table '%s' with '%s' format doesn't support defining PRIMARY KEY constraint"
                            + " on the table, because it can't guarantee the semantic of primary key.",
                    tableName.asSummaryString(), formatName));
        }
    }
A dynamic table factory implementation for TubeMQ.
inlong-sort/sort-flink/sort-flink-v1.13/sort-connectors/tubemq/src/main/java/org/apache/inlong/sort/tubemq/table/TubeMQDynamicTableFactory.java