Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-14201

Types: Remove hash-lookup from PrimitiveTypeInfo::getPrimitiveCategory()

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 2.2.0
    • None
    • Types

    Description

        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>();
      

      Not even a single intern() call there. SMH.

      Attachments

        1. HIVE-14201.1.patch
          1 kB
          Gopal Vijayaraghavan

        Activity

          People

            gopalv Gopal Vijayaraghavan
            gopalv Gopal Vijayaraghavan
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: