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

Fix NPE in the HiveMetastore add partition tests

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 4.0.0-alpha-1
    • Metastore, Test
    • None

    Description

      The TestAddPartitions and TestAddPartitionsFromPartSpec tests revealed that NPE is thrown in some cases. These NPEs could be prevented with a simple null check and a MetaException with a proper error message should be thrown instead.
      Example: NPE is thrown in the following test cases

      • TestAddPartitions
        • testAddPartitionNullPartition
        • testAddPartitionNullValue
        • testAddPartitionsNullList
      • TestAddPartitionsFromPartSpec
        • testAddPartitionSpecNullSpec
        • testAddPartitionSpecNullPartList
        • testAddPartitionSpecNoDB
        • testAddPartitionSpecNoTable
        • testAddPartitionSpecNoDBAndTableInPartition
        • testAddPartitionSpecNullPart
        • testAddPartitionSpecChangeRootPathToNull
        • testAddPartitionSpecWithSharedSDNullSd
        • testAddPartitionSpecWithSharedSDNoValue
        • testAddPartitionSpecNullValue

      Attachments

        1. HIVE-19158.1.patch
          28 kB
          Marta Kuczora
        2. HIVE-19158.2.patch
          28 kB
          Marta Kuczora
        3. HIVE-19158.3.patch
          28 kB
          Marta Kuczora

        Activity

          People

            kuczoram Marta Kuczora
            kuczoram Marta Kuczora
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: