protected static ClickHouseVersion parseVersion(String version) {
        if (version == null || version.isEmpty()) {
            return defaultVersion;
        }

        boolean latest = false;
        int[] parts = new int[4];
        Matcher m = versionPattern.matcher(version);
        if (m.matches()) {
            for (int i = 0, len = Math.min(m.groupCount(), parts.length); i < len; i++) {
                try {
                    parts[i] = Integer.parseInt(m.group(i + 1));
                } catch (NumberFormatException e) {
                    // definitely don't want to break anything
                }
            }
        } else {
            version = version.trim().toLowerCase(Locale.ROOT);

            int index = Math.max(version.lastIndexOf(' '), version.lastIndexOf(':'));
            latest = STR_LATEST.equals(index == -1 ? version : version.substring(index + 1));
        }

        return latest ? latestVersion : new ClickHouseVersion(false, parts[0], parts[1], parts[2], parts[3]);
    }
Parses given version without caching.

@param version version, null or empty string is treated as {@code 0.0.0.0}
@return parsed version
clickhouse-data/src/main/java/com/clickhouse/data/ClickHouseVersion.java