public ClickHouseClientBuilder config(ClickHouseConfig config) {
        this.config = config;

        this.credentials = config.getDefaultCredentials();
        this.metricRegistry = config.getMetricRegistry().orElse(null);
        this.nodeSelector = config.getNodeSelector();

        this.options.putAll(config.getAllOptions());

        return this;
    }
Sets configuration.

@param config non-null configuration
@return this builder
clickhouse-client/src/main/java/com/clickhouse/client/ClickHouseClientBuilder.java