[ https://issues.apache.org/jira/browse/HIVE-2418?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13289914#comment-13289914 ]
Mark Grover commented on HIVE-2418: ----------------------------------- No worries, Ed. I thought about that too. However, StringBuilder doesn't have a clear() so in order to clear it (in a non-hacky way), we have to re-create it. Alternatively, if we use Text as the return type of processInput() and get rid of the StringBuilder object, we will have to call Text.append() to append new code points to the result. Text.append() takes a byte[] as parameter. However, all the ways I can think of right now to convert a char[] (containing the code point) to byte[] (for appending to the Text object) involve creating an immutable String object as an intermediary which kind of defeats the purpose of moving away from the StringBuilder object. Given this information, I think it's best if we keep the StringBuilder creation and the code the way it is. Thanks! > replace or translate function in hive > ------------------------------------- > > Key: HIVE-2418 > URL: https://issues.apache.org/jira/browse/HIVE-2418 > Project: Hive > Issue Type: Task > Components: Query Processor > Affects Versions: 0.7.0 > Environment: hive-0.7.0 > Reporter: kranthikiran > Assignee: Mark Grover > Labels: cql > Attachments: udf_translate_v1.patch, > udf_translate_v2_with_1_negative_test.patch, > udf_translate_v2_with_3_negative_tests.patch, > udf_translate_v3_with_1_negative_test.patch, > udf_translate_v3_with_3_negative_tests.patch > > Original Estimate: 96h > Remaining Estimate: 96h > > replace or translate function in hive -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira