You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by "Thomas Friedrich (JIRA)" <ji...@apache.org> on 2016/08/12 22:54:20 UTC
[jira] [Created] (HIVE-14533) improve performance of
enforceMaxLength in HiveCharWritable/HiveVarcharWritable
Thomas Friedrich created HIVE-14533:
---------------------------------------
Summary: improve performance of enforceMaxLength in HiveCharWritable/HiveVarcharWritable
Key: HIVE-14533
URL: https://issues.apache.org/jira/browse/HIVE-14533
Project: Hive
Issue Type: Improvement
Components: Serializers/Deserializers
Affects Versions: 2.1.0, 1.2.1
Reporter: Thomas Friedrich
Assignee: Thomas Friedrich
Priority: Minor
The enforceMaxLength method in HiveVarcharWritable calls
set(getHiveVarchar(), maxLength); and in HiveCharWritable set(getHiveChar(), maxLength); no matter how long the string is. The calls to getHiveVarchar() and getHiveChar() decode the string every time the method is called (Text.toString() calls Text.decode). This can be very expensive and is unnecessary if the string is shorter than maxLength for HiveVarcharWritable or different than maxLength for HiveCharWritable.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)