private void ensureSchemaTypeIsValid(Schema<?> schema) {
        SchemaInfo info = schema.getSchemaInfo();
        if (info.getType() == SchemaType.AUTO_CONSUME) {
            throw new IllegalArgumentException(
                    "Auto schema is only supported by providing a GenericRecordDeserializer");
        }
        if (info.getType() == SchemaType.AUTO_PUBLISH) {
            throw new IllegalStateException(
                    "Auto produce schema is not supported in consuming messages");
        }
    }
Topic name and topic pattern are conflict, make sure they are set only once.
inlong-sort/sort-flink/sort-flink-v1.18/sort-connectors/pulsar/src/main/java/org/apache/inlong/sort/pulsar/source/PulsarSourceBuilder.java