v.21.1New Features
Support isIPv4String and isIPv6String Functions Similar to MySQL
Support builtin functionisIPv4String&&isIPv6Stringlike MySQL. #18349 (Du Chuan).
Why it matters
These functions solve the problem of quickly verifying whether a given string is a valid IPv4 or IPv6 address in queries. This enhances data validation capabilities and simplifies IP address handling within ClickHouse.How to use it
Use the functions directly in your SQL queries by callingisIPv4String(string) or isIPv6String(string). They return a boolean indicating if the string is a valid IPv4 or IPv6 address respectively. For example:SELECT isIPv4String('192.168.0.1');
SELECT isIPv6String('2001:0db8::1');