boluor opened a new pull request, #3914:
URL: https://github.com/apache/doris-website/pull/3914
### Problem
On the **dev (current)** and **4.x** trees, every example on
`ipv6_cidr_to_range` wraps the input in `INET6_ATON('...')`. The value
`INET6_ATON` returns is rejected by `ipv6_cidr_to_range`, so on both
**4.1.1**
and **master** the examples error instead of producing the documented output:
```
SELECT ipv6_cidr_to_range(INET6_ATON('2001:db8::1'), 64);
ERROR 1105 (HY000): errCode = 2, detailMessage =
(127.0.0.1)[INVALID_ARGUMENT]Invalid IPv6 value
```
The 2.1/3.x docs use the working `to_ipv6('...')` form.
### Fix (dev + 4.x, EN + ZH)
- `INET6_ATON(...)` → `to_ipv6(...)` so the examples run.
- `` as range `` → `` as `range` `` — `range` is a reserved keyword and
otherwise
fails to parse (`mismatched input 'range'`).
- ZH `/48` example: the expected `max` was truncated by one group
(`2001:db8:1:ffff:ffff:ffff:ffff` →
`2001:db8:1:ffff:ffff:ffff:ffff:ffff`); the
EN doc was already correct.
### Verification
Ran every example on the page end-to-end against a live **Apache Doris
4.1.1**
cluster (dev tree verified against it too): all pass. The `/48` range now
returns
the full address on both languages:
```
SELECT ipv6_cidr_to_range(to_ipv6('2001:db8:1::1'), 48) as `range`;
+---------------------------------------------------------------------+
| {"min":"2001:db8:1::", "max":"2001:db8:1:ffff:ffff:ffff:ffff:ffff"} |
+---------------------------------------------------------------------+
```
The out-of-range example still raises `Illegal cidr value '129'` as
documented.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]