TRY_INET_ATON (Lakehouse v1)
try_inet_aton 函数接收字符串形式的 IPv4 地址点分十进制表示,并以整数形式返回该 IP 地址的数值。
Analyze 语法
Section titled “Analyze 语法”func.try_inet_aton(<str>)Analyze 示例
Section titled “Analyze 示例”func.try_inet_aton('10.0.5.9')
┌────────────────────────────────┐│ func.try_inet_aton('10.0.5.9') │├────────────────────────────────┤│ 167773449 │└────────────────────────────────┘SQL 语法
Section titled “SQL 语法”TRY_INET_ATON( <str> )整数。
SQL 示例
Section titled “SQL 示例”SELECT TRY_INET_ATON('10.0.5.9'), TRY_IPV4_STRING_TO_NUM('10.0.5.9');
┌────────────────────────────────────────────────────────────────┐│ try_inet_aton('10.0.5.9') │ try_ipv4_string_to_num('10.0.5.9') ││ UInt32 │ UInt32 │├───────────────────────────┼────────────────────────────────────┤│ 167773449 │ 167773449 │└────────────────────────────────────────────────────────────────┘