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

Insert overwrite table db.tname fails if partition already exists

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.9.0
    • Component/s: Database/Schema, Metastore
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      Insert Overwrite table db.tname fails if partition already exists.
      For example-
      insert overwrite table db.tname PARTITION(part='p') select .. from t2 where part='p'; fails if partition 'p' already exists. Workaround is - use db; and the fire the command.
      From the source code-
      alterPartition(tbl.getTableName(), new Partition(tbl, tpart)); takes String tablename as argument and loses db information. Table table = newTable(tablename) is called to retrieve table from name. But, it relies on currentDatabase value (hence the workaround).

        Attachments

        1. HIVE-2617.1.patch
          16 kB
          Chinna Rao Lalam
        2. ASF.LICENSE.NOT.GRANTED--HIVE-2617.D843.1.patch
          24 kB
          Phabricator
        3. HIVE-2617.patch
          24 kB
          Chinna Rao Lalam

          Activity

            People

            • Assignee:
              chinnalalam Chinna Rao Lalam
              Reporter:
              aniket486 Aniket Mokashi
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: