private static List<JdbcDialectFactory> discoverFactories(ClassLoader classLoader) {
        try {
            final List<JdbcDialectFactory> result = new LinkedList<>();
            ServiceLoader.load(JdbcDialectFactory.class, classLoader)
                    .iterator()
                    .forEachRemaining(result::add);
            return result;
        } catch (ServiceConfigurationError e) {
            LOG.error("Could not load service provider for jdbc dialects factory.", e);
            throw new RuntimeException(
                    "Could not load service provider for jdbc dialects factory.", e);
        }
    }
Loads the unique JDBC Dialect that can handle the given database url.

@param url A database URL.
@throws IllegalStateException if the loader cannot find exactly one dialect that can
    unambiguously process the given database URL.
@return The loaded dialect.
inlong-sort/sort-flink/sort-flink-v1.15/sort-connectors/jdbc/src/main/java/org/apache/inlong/sort/jdbc/dialect/JdbcDialectLoader.java