You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by ng...@apache.org on 2017/12/01 21:09:01 UTC
hive git commit: HIVE-16890 Remove superfluous wrapper in
HiveVarcharWritable (Beluga Behr, reviewed by Naveen Gangam)
Repository: hive
Updated Branches:
refs/heads/master 33d527f25 -> 6a6522a09
HIVE-16890 Remove superfluous wrapper in HiveVarcharWritable (Beluga Behr, reviewed by Naveen Gangam)
Project: http://git-wip-us.apache.org/repos/asf/hive/repo
Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/6a6522a0
Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/6a6522a0
Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/6a6522a0
Branch: refs/heads/master
Commit: 6a6522a09f7d05d524c389923ab10531511c05eb
Parents: 33d527f
Author: Naveen Gangam <ng...@apache.org>
Authored: Fri Dec 1 16:08:41 2017 -0500
Committer: Naveen Gangam <ng...@apache.org>
Committed: Fri Dec 1 16:08:41 2017 -0500
----------------------------------------------------------------------
.../org/apache/hadoop/hive/serde2/io/HiveVarcharWritable.java | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hive/blob/6a6522a0/serde/src/java/org/apache/hadoop/hive/serde2/io/HiveVarcharWritable.java
----------------------------------------------------------------------
diff --git a/serde/src/java/org/apache/hadoop/hive/serde2/io/HiveVarcharWritable.java b/serde/src/java/org/apache/hadoop/hive/serde2/io/HiveVarcharWritable.java
index ae53bec..270d97f 100644
--- a/serde/src/java/org/apache/hadoop/hive/serde2/io/HiveVarcharWritable.java
+++ b/serde/src/java/org/apache/hadoop/hive/serde2/io/HiveVarcharWritable.java
@@ -64,9 +64,9 @@ public class HiveVarcharWritable extends HiveBaseCharWritable
}
public void enforceMaxLength(int maxLength) {
- // Might be possible to truncate the existing Text value, for now just do something simple.
- if (value.getLength()>maxLength && getCharacterLength()>maxLength)
- set(getHiveVarchar(), maxLength);
+ if (getCharacterLength() > maxLength) {
+ set(value.toString(), maxLength);
+ }
}
@Override