mirror of
https://github.com/elastic/elasticsearch.git
synced 2025-06-28 17:34:17 -04:00
Added ESQL function to get the prefix of an IP. It works now with both IPv4 and IPv6. For users planning to use it with mixed IPs, we may need to add a function like "is_ipv4()" first. **About the skipped test:** There's currently a "bug" in the evaluators//functions that return null. Evaluators can't handle them. We'll work on support for that in another PR. It affects other functions, like `substring()`. In this function, however, it only affects in "wrong" cases (Like an invalid prefix), so it has no impact. Fixes https://github.com/elastic/elasticsearch/issues/99064
12 lines
305 B
Text
Generated
12 lines
305 B
Text
Generated
// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
|
|
|
|
*Parameters*
|
|
|
|
`ip`::
|
|
IP address of type `ip` (both IPv4 and IPv6 are supported).
|
|
|
|
`prefixLengthV4`::
|
|
Prefix length for IPv4 addresses.
|
|
|
|
`prefixLengthV6`::
|
|
Prefix length for IPv6 addresses.
|