文档首页/
MapReduce服务 MRS/
组件操作指南(LTS版)/
使用HetuEngine/
HetuEngine常见SQL语法说明/
HetuEngine SQL函数和操作符说明/
IP Address函数
更新时间:2024-12-11 GMT+08:00
IP Address函数
contains(network, address) → boolean
当CIDR网络中包含address时返回true。
示例:
- 返回true:
SELECT contains('10.0.0.0/8', IPADDRESS '10.255.255.255'); SELECT contains('2001:0db8:0:0:0:ff00:0042:8329/128', IPADDRESS '2001:0db8:0:0:0:ff00:0042:8329');
- 返回false:
SELECT contains('10.0.0.0/8', IPADDRESS '11.255.255.255'); SELECT contains('2001:0db8:0:0:0:ff00:0042:8329/128', IPADDRESS '2001:0db8:0:0:0:ff00:0042:8328');