Note
Kailangan ng pahintulot para ma-access ang page na ito. Maaari mong subukang mag-sign in o magpalit ng mga direktoryo.
Ang pag-access sa pahinang ito ay nangangailangan ng pahintulot. Maaari mong subukang baguhin ang mga direktoryo.
Applies to:
Databricks Runtime 18.2 and above
Important
This feature is in Beta. Workspace admins can control access to this feature from the Previews page. See Manage Azure Databricks previews.
Returns the canonical representation of an IPv4 or IPv6 address.
Syntax
ip_host ( ip )
Arguments
ip: ASTRINGorBINARYvalue representing a valid IPv4 or IPv6 address.
Returns
The same type as the input (STRING or BINARY), representing the canonical form of the address.
The function returns NULL if the input is NULL.
Error conditions
- If the input is not a valid IPv4 or IPv6 address, the function returns INVALID_IP_ADDRESS.
Examples
> SELECT ip_host('192.168.1.5');
192.168.1.5
> SELECT ip_host('2001:0db8:0000:0000:0000:0000:0000:0001');
2001:db8::1
> SELECT ip_host('2001:DB8::1');
2001:db8::1
> SELECT ip_host('::ffff:192.0.2.128');
::ffff:192.0.2.128
> SELECT hex(ip_host(X'C0A80101'));
C0A80101
> SELECT ip_host(NULL);
NULL
> SELECT ip_host('invalid.ip');
Error: INVALID_IP_ADDRESS