ClickHouse/dbms/tests/queries/0_stateless/00725_ipv4_ipv6_domains.reference
Vasily Nemkov 2716df8ab2 IPv4 and IPv6 Domain implementation.
Added:
 * IDataTypeDomain interface;
 * method DataTypeFactory::registerDataTypeDomain for registering domains;
 * DataTypeDomainWithSimpleSerialization domain base class with simple serialization/deserialization;
 * Concrete IPv4 and IPv6 domain implementations: DataTypeDomanIPv6 and DataTypeDomanIPv4;

Updated:
 * IDataType text serialization/deserialization methods;
 * IDataType implementation to use domain for text serialization/deserialization;
 * Refactored implementation of the IPv4/IPv6 functions to use formatIPv4/v6 and parseIPv4/v6 from Common/formatIPv6.h;

Tests:
 * Added test cases for IPv4 and IPv6 domains.
 * Updated IPv4/v6 functions tests to validate more cases;
 * Added performance tests for IPv4 and IPv6 related functions;
2019-02-04 12:37:46 +03:00

28 lines
994 B
Plaintext

CREATE TABLE test.ipv4_test ( ipv4_ IPv4) ENGINE = Memory
0.0.0.0 00
8.8.8.8 08080808
127.0.0.1 7F000001
192.168.0.91 C0A8005B
255.255.255.255 FFFFFFFF
< 127.0.0.1 0.0.0.0
< 127.0.0.1 8.8.8.8
> 127.0.0.1 192.168.0.91
> 127.0.0.1 255.255.255.255
= 127.0.0.1 127.0.0.1
euqality of IPv4-mapped IPv6 value and IPv4 promoted to IPv6 with function: 1
CREATE TABLE test.ipv6_test ( ipv6_ IPv6) ENGINE = Memory
:: 00000000000000000000000000000000
:: 00000000000000000000000000000000
::ffff:8.8.8.8 00000000000000000000FFFF08080808
::ffff:127.0.0.1 00000000000000000000FFFF7F000001
::ffff:193.252.17.10 00000000000000000000FFFFC1FC110A
2001:db8:ac10:fe01:feed:babe:cafe:f00d 20010DB8AC10FE01FEEDBABECAFEF00D
ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
< 127.0.0.1 ::
< 127.0.0.1 ::
< 127.0.0.1 ::ffff:8.8.8.8
> 127.0.0.1 ::ffff:193.252.17.10
> 127.0.0.1 2001:db8:ac10:fe01:feed:babe:cafe:f00d
> 127.0.0.1 ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff
= 127.0.0.1 ::ffff:127.0.0.1