[ https://issues.apache.org/jira/browse/HIVE-10657?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alexander Pivovarov updated HIVE-10657: --------------------------------------- Description: Current MD5 UDF implementation uses Apache Commons DigestUtils.md5Hex method to get md5 hex. DigestUtils does not provide md5Hex method with signature (byte[], start, length). This is why copyBytes method was added to UDFMd5 to get bytes[] from BytesWritable. To avoid copying bytes from BytesWritable to new byte array we can use java MessageDigest API directly. MessageDigest has method update(byte[], start, length) was: Current implementation uses Apache Commons DigestUtils.md5Hex method to get md5 hex. DigestUtils does not provide md5Hex method with signature (byte[], start, length). This is why copyBytes method was added to get bytes[] from BytesWritable. To avoid copying bytes from BytesWritable to new byte array we can use java MessageDigest API directly. MessageDigest has method update(byte[], start, length) > Remove copyBytes operation from MD5 UDF > --------------------------------------- > > Key: HIVE-10657 > URL: https://issues.apache.org/jira/browse/HIVE-10657 > Project: Hive > Issue Type: Improvement > Components: UDF > Reporter: Alexander Pivovarov > Assignee: Alexander Pivovarov > Priority: Minor > > Current MD5 UDF implementation uses Apache Commons DigestUtils.md5Hex method > to get md5 hex. > DigestUtils does not provide md5Hex method with signature (byte[], start, > length). This is why copyBytes method was added to UDFMd5 to get bytes[] from > BytesWritable. > To avoid copying bytes from BytesWritable to new byte array we can use java > MessageDigest API directly. > MessageDigest has method update(byte[], start, length) -- This message was sent by Atlassian JIRA (v6.3.4#6332)