forked from opensearch-project/sql
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Minor documentation to better align with Spark
cidrmatch
behaviour.
Signed-off-by: currantw <[email protected]>
- Loading branch information
Showing
4 changed files
with
18 additions
and
18 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,32 @@ | ||
================ | ||
IP Functions | ||
================ | ||
==================== | ||
IP Address Functions | ||
==================== | ||
|
||
.. rubric:: Table of contents | ||
|
||
.. contents:: | ||
:local: | ||
:depth: 1 | ||
|
||
CIDR | ||
------ | ||
CIDRMATCH | ||
--------- | ||
|
||
Description | ||
>>>>>>>>>>> | ||
|
||
Usage: cidr(address, range) returns whether the given IP address is within the specified IP address range. Supports both IPv4 and IPv6 addresses. | ||
Usage: cidrmatch(ip, cidr) returns whether the given IP address is within the specified CIDR IP address range. Supports both IPv4 and IPv6 addresses. | ||
|
||
Argument type: STRING, STRING | ||
|
||
Return type: BOOLEAN | ||
|
||
Example:: | ||
|
||
os> source=weblogs | where cidr(address, "199.120.110.0/24") | fields host, method, url | ||
fetched rows / total rows = 1/1 | ||
+----------------+--------+----------------------------------------------+ | ||
| host | method | url | | ||
|----------------+--------+----------------------------------------------+ | ||
| 199.120.110.21 | GET | /shuttle/missions/sts-73/mission-sts-73.html | | ||
+----------------+--------+----------------------------------------------+ | ||
os> source=weblogs | where cidrmatch(host, "199.120.110.0/24") | fields host | ||
fetched rows / total rows = 1/3 | ||
+----------------+ | ||
| host | | ||
|----------------+ | ||
| 199.120.110.21 | | ||
+----------------+ | ||
|
This file contains 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