[
https://issues.apache.org/jira/browse/HIVE-14533?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Thomas Friedrich updated HIVE-14533:
------------------------------------
Labels: performance (was: )
Status: Patch Available (was: Open)
> 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
> Labels: performance
> Attachments: HIVE-14533.patch
>
>
> 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)