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

Avro SerDe InstanceCache returns incorrect schema

    XMLWordPrintableJSON

Details

    • Patch

    Description

      To reproduce this error, take two fields in an avro schema document matching the following:
      "type" : { "type": "array", "items": [ "null",

      { "type": "map", "values": [ "null", "string" ] }

      ] }
      "type" : { "type": "map", "values": [ "null" ,

      { "type": "array", "items": [ "null" , "string"] }

      ] }
      After creating two tables in hive with these schemas, the describe statement on each of them will only return the schema for the first one loaded. This is due to a hashCode() collision in the InstanceCache.

      A patch will be included in this ticket shortly which removes the hashCode call from the InstanceCache's internal HashMap, and instead provides the entire schema object.

      Attachments

        1. HIVE-11288.4.patch
          5 kB
          Greg Phillips
        2. HIVE-11288.3.patch
          6 kB
          Greg Phillips
        3. HIVE-11288.2.patch
          3 kB
          Greg Phillips
        4. HIVE-11288.patch
          1 kB
          Greg Phillips

        Activity

          People

            gphillips Greg Phillips
            gphillips Greg Phillips
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: