You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Gopal V (JIRA)" <ji...@apache.org> on 2016/07/09 02:51:10 UTC
[jira] [Updated] (HIVE-14201) Types: Remove hash-lookup from
PrimitiveTypeInfo::getPrimitiveCategory()
[ https://issues.apache.org/jira/browse/HIVE-14201?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Gopal V updated HIVE-14201:
---------------------------
Attachment: HIVE-14201.1.patch
> Types: Remove hash-lookup from PrimitiveTypeInfo::getPrimitiveCategory()
> ------------------------------------------------------------------------
>
> Key: HIVE-14201
> URL: https://issues.apache.org/jira/browse/HIVE-14201
> Project: Hive
> Issue Type: Bug
> Components: Types
> Affects Versions: 2.2.0
> Reporter: Gopal V
> Assignee: Gopal V
> Labels: Performance
> Attachments: HIVE-14201.1.patch
>
>
> {code}
> public PrimitiveCategory getPrimitiveCategory() {
> return getPrimitiveTypeEntry().primitiveCategory;
> }
> public PrimitiveTypeEntry getPrimitiveTypeEntry() {
> return PrimitiveObjectInspectorUtils.getTypeEntryFromTypeName(typeName);
> }
> /**
> * Get the TypeEntry for the given base type name (int, varchar, etc).
> */
> public static PrimitiveTypeEntry getTypeEntryFromTypeName(String typeName) {
> return typeNameToTypeEntry.get(typeName);
> }
> // Base type name to PrimitiveTypeEntry map.
> private static final Map<String, PrimitiveTypeEntry> typeNameToTypeEntry = new HashMap<String, PrimitiveTypeEntry>();
> {code}
> Not even a single intern() call there. SMH.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)