public boolean belongsTo(ClickHouseVersionUtils version) {
        if (version == null) {
            version = defaultVersion;
        }

        if (isLatest()) {
            return version.isLatest();
        } else if (version.isLatest()) {
            return false;
        }

        if (year != version.year) {
            return false;
        }

        if (version.feature == 0 && version.maintenance == 0 && version.build == 0) {
            return true;
        } else if (feature != version.feature) {
            return false;
        }

        if (version.maintenance == 0 && version.build == 0) {
            return true;
        } else if (maintenance != version.maintenance) {
            return false;
        }

        return version.build == 0 || build == version.build;
    }
Checks if the version belongs to the given series. For example: 21.3.1.1
belongs to 21.3 series but not 21.4 or 21.3.2.

@param version version series, null will be treated as {@code 0.0.0.0}
@return true if the version belongs to the given series; false otherwise
clickhouse-client/src/main/java/com/clickhouse/client/ClickHouseVersionUtils.java