mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-10 01:25:21 +00:00
tests added
This commit is contained in:
parent
24067ea977
commit
fc857aa2db
@ -11,6 +11,10 @@ IPv4 functions
|
||||
127.0.0.1
|
||||
127.0.0.1
|
||||
--
|
||||
1.2.3.4
|
||||
1.2.3.4
|
||||
0.0.0.0
|
||||
--
|
||||
127.0.0.1
|
||||
--
|
||||
0
|
||||
|
@ -20,6 +20,13 @@ SELECT toIPv4OrNull('127.0.0.1');
|
||||
|
||||
SELECT '--';
|
||||
|
||||
SELECT toIPv4(toIPv6('::ffff:1.2.3.4'));
|
||||
SELECT toIPv4(toIPv6('::afff:1.2.3.4')); --{serverError CANNOT_CONVERT_TYPE}
|
||||
SELECT toIPv4OrDefault(toIPv6('::ffff:1.2.3.4'));
|
||||
SELECT toIPv4OrDefault(toIPv6('::afff:1.2.3.4'));
|
||||
|
||||
SELECT '--';
|
||||
|
||||
SELECT cast('test' , 'IPv4'); --{serverError CANNOT_PARSE_IPV4}
|
||||
SELECT cast('127.0.0.1' , 'IPv4');
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user