public <T extends Serializable> T getSetting(String setting, T defaultValue) {
        Serializable value = settings.get(ClickHouseChecker.nonBlank(setting, PARAM_SETTING));
        ClickHouseChecker.nonNull(defaultValue, "defaultValue");
        if (value == null) {
            return defaultValue;
        }

        return (T) ClickHouseOption.fromString(value.toString(), defaultValue.getClass());
    }
Gets typed setting value.

@param <T>          type of the setting value
@param setting      non-null setting key
@param defaultValue non-null default value
@return non-null value
clickhouse-client/src/main/java/com/clickhouse/client/ClickHouseRequest.java