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

Metastore throws NPE if StorageDescriptor.cols is null

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.1.0, 2.2.0
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      When using the HiveMetaStoreClient API directly to talk to the metastore, you get NullPointerExceptions when StorageDescriptor.cols is null in the Table/Partition object in the following calls:

      • create_table
      • alter_table
      • alter_partition

      Calling add_partition with StorageDescriptor.cols set to null causes null to be stored in the metastore database and subsequent calls to alter_partition for that partition to fail with an NPE.

      Null checks should be added to eliminate the NPEs in the metastore.

        Attachments

        1. HIVE-15353.5.patch
          0.8 kB
          Anthony Hsu
        2. HIVE-15353.4.patch
          2 kB
          Anthony Hsu
        3. HIVE-15353.3.patch
          2 kB
          Anthony Hsu
        4. HIVE-15353.2.patch
          11 kB
          Anthony Hsu
        5. HIVE-15353.1.patch
          9 kB
          Anthony Hsu

          Issue Links

            Activity

              People

              • Assignee:
                erwaman Anthony Hsu
                Reporter:
                erwaman Anthony Hsu
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: