[ 
https://issues.apache.org/jira/browse/HIVE-21313?focusedWorklogId=443165&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-443165
 ]

ASF GitHub Bot logged work on HIVE-21313:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 09/Jun/20 16:37
            Start Date: 09/Jun/20 16:37
    Worklog Time Spent: 10m 
      Work Description: github-actions[bot] commented on pull request #548:
URL: https://github.com/apache/hive/pull/548#issuecomment-641143884


   This pull request has been automatically marked as stale because it has not 
had recent activity. It will be closed if no further activity occurs.
   Feel free to reach out on the [email protected] list if the patch is in 
need of reviews.


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
[email protected]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 443165)
    Time Spent: 0.5h  (was: 20m)

> Use faster function to point to instead of copy immutable byte arrays
> ---------------------------------------------------------------------
>
>                 Key: HIVE-21313
>                 URL: https://issues.apache.org/jira/browse/HIVE-21313
>             Project: Hive
>          Issue Type: Improvement
>    Affects Versions: All Versions
>            Reporter: ZhangXin
>            Assignee: ZhangXin
>            Priority: Minor
>              Labels: pull-request-available
>             Fix For: All Versions
>
>         Attachments: HIVE-21313.patch, HIVE-21313.patch
>
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> In file ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorAssignRow.java
> We may find code like this:
> ```
> Text text = (Text) convertTargetWritable;
>  if (text == null)
> {     text = new Text(); }
> text.set(string);
>  ((BytesColumnVector) columnVector).setVal(
>      batchIndex, text.getBytes(), 0, text.getLength());
> ```
>  
> Using `setVal` method can copy the bytes array generated by 
> `text.getBytes()`. This is totally unnecessary at all. Since the bytes array 
> is immutable, we can just use `setRef` method to point to the specific  byte 
> array, which will also lower the memory usage.
>  
> Pull request on Github:  https://github.com/apache/hive/pull/548
>  
>  
>  
>  
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to