This is an automated email from the ASF dual-hosted git repository. dzamo pushed a commit to branch gh-pages in repository https://gitbox.apache.org/repos/asf/drill.git
commit 4a037af9ac1062014e52325781045dd664e8fd93 Author: James Turton <[email protected]> AuthorDate: Sun May 9 14:42:35 2021 +0200 Document IP networking functions. --- _data/docs.json | 112 ++++++++++++++++++--- .../sql-functions/100-ip-net-functions.md | 26 +++++ 2 files changed, 124 insertions(+), 14 deletions(-) diff --git a/_data/docs.json b/_data/docs.json index 2f127f6..5977f34 100644 --- a/_data/docs.json +++ b/_data/docs.json @@ -5827,6 +5827,27 @@ "title": "How to Partition Data", "url": "/docs/how-to-partition-data/" }, + "IP Network functions": { + "breadcrumbs": [ + { + "title": "SQL Functions", + "url": "/docs/sql-functions/" + }, + { + "title": "SQL Reference", + "url": "/docs/sql-reference/" + } + ], + "children": [], + "next_title": "SQL Window Functions", + "next_url": "/docs/sql-window-functions/", + "parent": "SQL Functions", + "previous_title": "Time Series Analysis Functions", + "previous_url": "/docs/time-series-analysis-functions/", + "relative_path": "_docs/sql-reference/sql-functions/100-ip-net-functions.md", + "title": "IP Network functions", + "url": "/docs/ip-network-functions/" + }, "Identifying Multiple Drill Versions in a Cluster": { "breadcrumbs": [ { @@ -13042,14 +13063,35 @@ } ], "children": [], - "next_title": "SQL Window Functions", - "next_url": "/docs/sql-window-functions/", + "next_title": "IP Network functions", + "next_url": "/docs/ip-network-functions/", "parent": "SQL Functions", "previous_title": "GIS functions", "previous_url": "/docs/gis-functions/", "relative_path": "_docs/sql-reference/sql-functions/090-time-series-analysis-functions.md", "title": "Time Series Analysis Functions", "url": "/docs/time-series-analysis-functions/" + }, + { + "breadcrumbs": [ + { + "title": "SQL Functions", + "url": "/docs/sql-functions/" + }, + { + "title": "SQL Reference", + "url": "/docs/sql-reference/" + } + ], + "children": [], + "next_title": "SQL Window Functions", + "next_url": "/docs/sql-window-functions/", + "parent": "SQL Functions", + "previous_title": "Time Series Analysis Functions", + "previous_url": "/docs/time-series-analysis-functions/", + "relative_path": "_docs/sql-reference/sql-functions/100-ip-net-functions.md", + "title": "IP Network functions", + "url": "/docs/ip-network-functions/" } ], "next_title": "About SQL Function Examples", @@ -13489,14 +13531,35 @@ } ], "children": [], - "next_title": "SQL Window Functions", - "next_url": "/docs/sql-window-functions/", + "next_title": "IP Network functions", + "next_url": "/docs/ip-network-functions/", "parent": "SQL Functions", "previous_title": "GIS functions", "previous_url": "/docs/gis-functions/", "relative_path": "_docs/sql-reference/sql-functions/090-time-series-analysis-functions.md", "title": "Time Series Analysis Functions", "url": "/docs/time-series-analysis-functions/" + }, + { + "breadcrumbs": [ + { + "title": "SQL Functions", + "url": "/docs/sql-functions/" + }, + { + "title": "SQL Reference", + "url": "/docs/sql-reference/" + } + ], + "children": [], + "next_title": "SQL Window Functions", + "next_url": "/docs/sql-window-functions/", + "parent": "SQL Functions", + "previous_title": "Time Series Analysis Functions", + "previous_url": "/docs/time-series-analysis-functions/", + "relative_path": "_docs/sql-reference/sql-functions/100-ip-net-functions.md", + "title": "IP Network functions", + "url": "/docs/ip-network-functions/" } ], "next_title": "About SQL Function Examples", @@ -13625,8 +13688,8 @@ "next_title": "SQL Window Functions Introduction", "next_url": "/docs/sql-window-functions-introduction/", "parent": "SQL Reference", - "previous_title": "Time Series Analysis Functions", - "previous_url": "/docs/time-series-analysis-functions/", + "previous_title": "IP Network functions", + "previous_url": "/docs/ip-network-functions/", "relative_path": "_docs/sql-reference/055-sql-window-functions.md", "title": "SQL Window Functions", "url": "/docs/sql-window-functions/" @@ -14720,8 +14783,8 @@ "next_title": "SQL Window Functions Introduction", "next_url": "/docs/sql-window-functions-introduction/", "parent": "SQL Reference", - "previous_title": "Time Series Analysis Functions", - "previous_url": "/docs/time-series-analysis-functions/", + "previous_title": "IP Network functions", + "previous_url": "/docs/ip-network-functions/", "relative_path": "_docs/sql-reference/055-sql-window-functions.md", "title": "SQL Window Functions", "url": "/docs/sql-window-functions/" @@ -15805,8 +15868,8 @@ } ], "children": [], - "next_title": "SQL Window Functions", - "next_url": "/docs/sql-window-functions/", + "next_title": "IP Network functions", + "next_url": "/docs/ip-network-functions/", "parent": "SQL Functions", "previous_title": "GIS functions", "previous_url": "/docs/gis-functions/", @@ -21378,14 +21441,35 @@ } ], "children": [], - "next_title": "SQL Window Functions", - "next_url": "/docs/sql-window-functions/", + "next_title": "IP Network functions", + "next_url": "/docs/ip-network-functions/", "parent": "SQL Functions", "previous_title": "GIS functions", "previous_url": "/docs/gis-functions/", "relative_path": "_docs/sql-reference/sql-functions/090-time-series-analysis-functions.md", "title": "Time Series Analysis Functions", "url": "/docs/time-series-analysis-functions/" + }, + { + "breadcrumbs": [ + { + "title": "SQL Functions", + "url": "/docs/sql-functions/" + }, + { + "title": "SQL Reference", + "url": "/docs/sql-reference/" + } + ], + "children": [], + "next_title": "SQL Window Functions", + "next_url": "/docs/sql-window-functions/", + "parent": "SQL Functions", + "previous_title": "Time Series Analysis Functions", + "previous_url": "/docs/time-series-analysis-functions/", + "relative_path": "_docs/sql-reference/sql-functions/100-ip-net-functions.md", + "title": "IP Network functions", + "url": "/docs/ip-network-functions/" } ], "next_title": "About SQL Function Examples", @@ -21514,8 +21598,8 @@ "next_title": "SQL Window Functions Introduction", "next_url": "/docs/sql-window-functions-introduction/", "parent": "SQL Reference", - "previous_title": "Time Series Analysis Functions", - "previous_url": "/docs/time-series-analysis-functions/", + "previous_title": "IP Network functions", + "previous_url": "/docs/ip-network-functions/", "relative_path": "_docs/sql-reference/055-sql-window-functions.md", "title": "SQL Window Functions", "url": "/docs/sql-window-functions/" diff --git a/_docs/sql-reference/sql-functions/100-ip-net-functions.md b/_docs/sql-reference/sql-functions/100-ip-net-functions.md new file mode 100644 index 0000000..019e10a --- /dev/null +++ b/_docs/sql-reference/sql-functions/100-ip-net-functions.md @@ -0,0 +1,26 @@ +--- +title: "IP Networking functions" +slug: "IP Networking functions" +parent: "SQL Functions" +--- + +**Introduced in release:** 1.12. + +A set of functions for common computations on IP network addresses. + +| Function | Output | Description | +| --------------------------- | ------- | --------------------------------------------------------- | +| inet_aton(<ip>) | INT | Converts an IPv4 address into an integer | +| inet_ntoa( <int>) | VARCHAR | Converts an integer IP into dotted decimal notation | +| in_network( <ip>,<cidr> ) | BOOLEAN | Returns true if the IP address is in the given CIDR block | +| address_count( <cidr> ) | INT | Returns the number of IPs in a given CIDR block | +| broadcast_address( <cidr> ) | VARCHAR | Returns the broadcast address for a given CIDR block | +| netmask(<cidr> ) | VARCHAR | Returns the netmask for a given CIDR block | +| low_address(<cidr>) | VARCHAR | Returns the first address in a given CIDR block | +| high_address(<cidr>) | VARCHAR | Returns the last address in a given CIDR block | +| url_encode( <url> ) | VARCHAR | Returns a URL encoded string | +| url_decode( <url> ) | VARCHAR | Decodes a URL encoded string | +| is_valid_IP(<ip>) | BOOLEAN | Returns true if the IP is a valid IP address | +| is_private_ip(<ip>) | BOOLEAN | Returns true if the IP is a private IPv4 address | +| is_valid_IPv4(<ip>) | BOOLEAN | Returns true if the IP is a valid IPv4 address | +| is_valid_IPv6(<ip>) | BOOLEAN | Returns true if the IP is a valid IPv6 address |
