From 5fb5fd1884a7cf4f98992af11157ea1cd2f39d71 Mon Sep 17 00:00:00 2001 From: Sami Kerola Date: Fri, 3 Apr 2020 11:25:59 +0100 Subject: [PATCH] [docs] tell the cutIPv6() is cutting bytes not bits The IPv6CIDRToRange() appears to use bits while cutIPv6() will cut in bytes. WITH IPv6StringToNum('FFFF:FFFF:FFFF:FFFF:AAAA:AAAA:AAAA:AAAA') AS ipv6 SELECT cutIPv6(ipv6, 8, 0), tupleElement(IPv6CIDRToRange(ipv6, 64), 1) --- docs/en/sql_reference/functions/ip_address_functions.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/en/sql_reference/functions/ip_address_functions.md b/docs/en/sql_reference/functions/ip_address_functions.md index a7186a5d067..e412197d9ac 100644 --- a/docs/en/sql_reference/functions/ip_address_functions.md +++ b/docs/en/sql_reference/functions/ip_address_functions.md @@ -132,9 +132,9 @@ SELECT IPv6NumToString(IPv4ToIPv6(IPv4StringToNum('192.168.0.1'))) AS addr └────────────────────┘ ``` -## cutIPv6(x, bitsToCutForIPv6, bitsToCutForIPv4) {#cutipv6x-bitstocutforipv6-bitstocutforipv4} +## cutIPv6(x, bytesToCutForIPv6, bytesToCutForIPv4) {#cutipv6x-bytestocutforipv6-bytestocutforipv4} -Accepts a FixedString(16) value containing the IPv6 address in binary format. Returns a string containing the address of the specified number of bits removed in text format. For example: +Accepts a FixedString(16) value containing the IPv6 address in binary format. Returns a string containing the address of the specified number of bytes removed in text format. For example: ``` sql WITH