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

Gopal V commented on HIVE-20982:
--------------------------------

LGTM - +1 (heh, {{* @param output Rowboat used to carry columns values.}}).

Minor nit - the null setter can be made default, so that the entry is always 
cleared.
{code:java}
       final Object value = input.isCompacted() ? 
input.getCompactedValue().get(i) : input.getValue().get(columns[i]);
       if (value == null) {
-        output.add(null);
+        output[i] = (null);
         continue;
       }
{code}
into
{code:java}
       final Object value = input.isCompacted() ? 
input.getCompactedValue().get(i) : input.getValue().get(columns[i]);
+      output[i] = (null);
       if (value == null) {
-        output.add(null);
         continue;
       }
{code}

> Avoid the un-needed object creation within hotloop
> --------------------------------------------------
>
>                 Key: HIVE-20982
>                 URL: https://issues.apache.org/jira/browse/HIVE-20982
>             Project: Hive
>          Issue Type: Sub-task
>            Reporter: slim bouguerra
>            Assignee: slim bouguerra
>            Priority: Major
>              Labels: pull-request-available
>         Attachments: HIVE-20982.patch
>
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to