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

upgrade hive schema from 0.9.0 to 0.13.1 failed when back end db is postgres

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Patch Available
    • Major
    • Resolution: Unresolved
    • 0.13.1, 0.14.0
    • None
    • Metastore
    • None

    Description

      Using the following command to upgrade hive schema :
      schematool -dbType postgres -upgradeSchemaFrom 0.9.0

      then got this:
      ERROR: null value in column "SCHEMA_VERSION" violates not-null constraint

      Log shows that the upgrade sql file 014-HIVE-3764.postgres.sql failed.
      The sql in it is :
      INSERT INTO "VERSION" ("VER_ID", "SCHEMA_VERSION", "VERSION_COMMENT") VALUES (1, '', 'Initial value');
      And the result is:
      ERROR: null value in column "SCHEMA_VERSION" violates not-null constraint
      DETAIL: Failing row contains (1, null, Initial value).

      Attachments

        1. HIVE-7797.1.patch
          0.6 kB
          Nemon Lou

        Issue Links

          Activity

            People

              nemon Nemon Lou
              nemon Nemon Lou
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: