Hive数子IP与字符串IP之间的转换
字符串IP:247.164.62.58 对应的 数字IP:4154736186
数子IP=>字符串IP select concat_ws('.',conv(substr(hex(4154736186),1,2),16,10),conv(substr(hex(4154736186),3,2),16,10),conv(substr(hex(4154736186),5,2),16,10),conv(substr(hex(4154736186),7,2),16,10)) 字符串IP=>数字IP cast(split("247.164.62.58","\\.")[0] as bigint)*256*256*256+cast(split("247.164.62.58","\\.")[1] as bigint)*256*256+cast(split("247.164.62.58","\\.")[2] as bigint)*256+cast(split("247.164.62.58","\\.")[3] as bigint)