[ 
https://issues.apache.org/jira/browse/HIVE-2418?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13289533#comment-13289533
 ] 

Edward Capriolo commented on HIVE-2418:
---------------------------------------

@Mark sorry to make you go through a couple iterations because I did only did 
partial reviews. One last question/comment.

Hive tries to avoid allocating new objects each evaluate if possible.

I notice in your process input method.
{noformat}
+  private String processInput(Text input) {
+    StringBuilder resultBuilder = new StringBuilder();
{noformat}
Then later.
{noformat}
+    String resultString = resultBuilder.toString();
+    return resultString;
{noformat}

It is possible to change your return type to TEXT and declare the StringBuilder 
and result object outside the method, then each call to evaluate can clear 
these objects?

If you do not believe coding the feature this way will create less temporary 
objects/garbage just say 'no', and I will commit as is.

Also you need only provide the version with the single negative test if you 
commit a new version.  
 
                
> 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

        

Reply via email to