Skip to content

[doc](ip) fix IP predicate return type to BOOLEAN & add IPV6 mixed-storage best practice#3911

Merged
yiguolei merged 2 commits into
apache:masterfrom
csun5285:doc-ip-range-return-boolean
Jun 5, 2026
Merged

[doc](ip) fix IP predicate return type to BOOLEAN & add IPV6 mixed-storage best practice#3911
yiguolei merged 2 commits into
apache:masterfrom
csun5285:doc-ip-range-return-boolean

Conversation

@csun5285
Copy link
Copy Markdown
Contributor

@csun5285 csun5285 commented Jun 5, 2026

  1. Fix return type of IP predicate functions to BOOLEAN.
  2. Add a best-practice section to the IPV6 data type doc.

Versions

  • dev
  • 4.x
  • 3.x
  • 2.1 or older (not covered by version/language sync gate)

Languages

  • Chinese
  • English
  • Japanese candidate translation needed

Docs Checklist

  • Checked by AI
  • Test Cases Built
  • Updated required version and language counterparts, or explained why not
  • If only one language changed, confirmed whether source/translation counterparts need sync

csun5285 and others added 2 commits June 4, 2026 20:03
These functions return a boolean predicate (true/false, displayed as 1/0)
but the docs declared the return type as TINYINT. Correct them to BOOLEAN
across the en/zh-CN/ja docs (current + version-4.x):

- is_ip_address_in_range
- is_ipv4_string
- is_ipv6_string
- is_ipv4_mapped
- is_ipv4_compat

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
… with inverted index

Add a "best practice" section to the IPV6 data type doc covering how to
store a mixed IPv4/IPv6 column as IPv4-mapped IPv6 in a single IPV6 column
and filter it through an inverted index:

- schema with USING INVERTED index
- load-time normalization (Routine Load / Stream Load / INSERT INTO) via
  COALESCE(ipv4_to_ipv6(to_ipv4_or_null(...)), to_ipv6_or_null(...))
- query rewriting: IPv4 CIDR -> mapped IPv6 CIDR (prefix +96), exact match,
  allowlist / blocklist forms
- index-hit prerequisites, and why CIDR range queries need
  inverted_index_skip_threshold = 0 (two-sided BKD split bypass)

Added across en / zh-CN / ja (current + version-4.x).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@csun5285 csun5285 changed the title [doc](ip) fix return type of IP predicate functions to BOOLEAN [doc](ip) fix IP predicate return type to BOOLEAN & add IPV6 mixed-storage best practice Jun 5, 2026
@yiguolei
Copy link
Copy Markdown
Contributor

yiguolei commented Jun 5, 2026

run buildall

@yiguolei yiguolei merged commit 6bd8c88 into apache:master Jun 5, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants