public static Inet6Address convertToIpv6(String value) {
        if (value == null) {
            return null;
        } else if (value.isEmpty()) {
            return ClickHouseIpv6Value.DEFAULT;
        }

        try {
            for (InetAddress addr : InetAddress.getAllByName(value)) {
                if (addr instanceof Inet6Address) {
                    return (Inet6Address) addr;
                } else if (addr instanceof Inet4Address) {
                    return convertToIpv6((Inet4Address) addr);
                }
            }
        } catch (UnknownHostException e) {
            throw new IllegalArgumentException(ClickHouseUtils.format("Failed to convert [%s] to Inet6Address", value),
                    e);
        }

        throw new IllegalArgumentException(ClickHouseUtils.format("No Inet6Address for [%s]", value));
    }
Converts string to IPv6 address.

@param value string
@return IPv6 address
@throws IllegalArgumentException when failed to convert to IPv6 address
clickhouse-data/src/main/java/com/clickhouse/data/ClickHouseValues.java