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

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

                Author: ASF GitHub Bot
            Created on: 26/Jan/21 14:34
            Start Date: 26/Jan/21 14:34
    Worklog Time Spent: 10m 
      Work Description: rbalamohan commented on a change in pull request #1913:
URL: https://github.com/apache/hive/pull/1913#discussion_r564556300



##########
File path: serde/src/java/org/apache/hadoop/hive/serde2/io/HiveCharWritable.java
##########
@@ -83,8 +84,8 @@ public Text getStrippedValue() {
       return value;
     }
     // A lot of these methods could be done more efficiently by operating on 
the Text value
-    // directly, rather than converting to HiveChar.
-    return new Text(getHiveChar().getStrippedValue());
+    // directly, rather than converting to String
+    return new Text(StringUtils.stripEnd(value.toString(), " "));

Review comment:
       value.toString() in getHiveChar() would be the expensive part, due to 
decode. Ref: HIVE-24416.
   
   Isn't "value.toString()" in the proposed patch have the same issue? 




----------------------------------------------------------------
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:
us...@infra.apache.org


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

    Worklog Id:     (was: 542208)
    Time Spent: 20m  (was: 10m)

> Remove unnecessary HiveChar instantiation in HiveCharWritable.getStrippedValue
> ------------------------------------------------------------------------------
>
>                 Key: HIVE-24686
>                 URL: https://issues.apache.org/jira/browse/HIVE-24686
>             Project: Hive
>          Issue Type: Improvement
>            Reporter: László Bodor
>            Assignee: László Bodor
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 20m
>  Remaining Estimate: 0h
>




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

Reply via email to