You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@hive.apache.org by GitBox <gi...@apache.org> on 2021/01/27 08:55:13 UTC

[GitHub] [hive] abstractdog commented on a change in pull request #1913: HIVE-24686: Remove unnecessary HiveChar instantiation in HiveCharWritable.getStrippedValue

abstractdog commented on a change in pull request #1913:
URL: https://github.com/apache/hive/pull/1913#discussion_r565129630



##########
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:
       yeah, you're absolutely right, this is just a best-effort to remove new HiveChar(), but that's not really the problem indeed...I'll think about eliminating decode




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



---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org