[ 
https://issues.apache.org/jira/browse/HIVE-14533?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Prasanth Jayachandran updated HIVE-14533:
-----------------------------------------
       Resolution: Fixed
    Fix Version/s: 2.2.0
                   1.3.0
           Status: Resolved  (was: Patch Available)

Thanks for the patch [~tfriedr]! Committed patch to master and branch-1.

> 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: 1.2.1, 2.1.0
>            Reporter: Thomas Friedrich
>            Assignee: Thomas Friedrich
>            Priority: Minor
>              Labels: performance
>             Fix For: 1.3.0, 2.2.0
>
>         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)

Reply via email to