public static String encode(String str) {
        if (ClickHouseChecker.isNullOrEmpty(str)) {
            return "";
        }

        try {
            return URLEncoder.encode(str, DEFAULT_CHARSET);
        } catch (UnsupportedEncodingException e) {
            return str;
        }
    }
Encode given string using {@link URLEncoder} and
{@link StandardCharsets#UTF_8}.

@param str string to encode
@return non-null encoded string
clickhouse-data/src/main/java/com/clickhouse/data/ClickHouseUtils.java