hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas Friedrich (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (HIVE-14533) improve performance of enforceMaxLength in HiveCharWritable/HiveVarcharWritable
Date Fri, 12 Aug 2016 23:08:22 GMT

     [ 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)

Mime
View raw message