[fix](docs) ipv6_cidr_to_range examples error on 4.x/dev (INET6_ATON -> to_ipv6) + reserved-word alias + truncated IPv6#3914
Merged
Conversation
…-> to_ipv6) + fix reserved-word alias and a truncated IPv6
The ipv6-cidr-to-range examples in the dev (current) and 4.x trees were rewritten
to wrap the input in INET6_ATON(), whose return type is rejected by
ipv6_cidr_to_range with "[INVALID_ARGUMENT]Invalid IPv6 value" on both 4.1.1 and
master, so none of the examples on the page actually run. The 2.1/3.x docs use the
working to_ipv6() form. This restores to_ipv6() on dev + 4.x (EN + ZH).
Also:
- `as range` fails to parse because `range` is a reserved keyword
("mismatched input 'range'"); quote it as `` as `range` ``.
- ZH /48 example: the expected max address was truncated by one group
(`2001:db8:1:ffff:ffff:ffff:ffff` -> `2001:db8:1:ffff:ffff:ffff:ffff:ffff`);
EN was already correct. Fixed ZH to match the cluster.
Verified end-to-end on a live 4.1.1 cluster (and dev tree against it): all examples
pass (P3 F0); the single warn is the doc's intentional `(...)` elision of the host
prefix in the out-of-range "Illegal cidr value '129'" error example.
csun5285
approved these changes
Jun 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
On the dev (current) and 4.x trees, every example on
ipv6_cidr_to_rangewraps the input inINET6_ATON('...'). The valueINET6_ATONreturns is rejected byipv6_cidr_to_range, so on both 4.1.1and master the examples error instead of producing the documented output:
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`—rangeis a reserved keyword and otherwisefails to parse (
mismatched input 'range')./48example: the expectedmaxwas truncated by one group(
2001:db8:1:ffff:ffff:ffff:ffff→2001:db8:1:ffff:ffff:ffff:ffff:ffff); theEN 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
/48range now returnsthe full address on both languages:
The out-of-range example still raises
Illegal cidr value '129'as documented.