zhangstar333 commented on code in PR #44871: URL: https://github.com/apache/doris/pull/44871#discussion_r1868649509
########## fe/be-java-extensions/java-common/src/main/java/org/apache/doris/common/jni/utils/TypeNativeBytes.java: ########## @@ -58,6 +60,20 @@ public static BigInteger getBigInteger(byte[] bytes) { return new BigInteger(originalBytes); } + public static InetAddress getInetAddress(byte[] bytes) { + // Convert the byte order back if necessary + byte[] originalBytes = convertByteOrder(bytes); + try { + return InetAddress.getByAddress(originalBytes); + } catch (UnknownHostException e) { + return null; + } + } + + public static byte[] getInetAddressBytes(InetAddress v) { + return convertByteOrder(v.getAddress()).clone(); Review Comment: why here need clone after convertByteOrder? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org