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

Insert overwrite table db.tname fails if partition already exists

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 0.9.0
    • Database/Schema, Metastore
    • None
    • 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.patch
          24 kB
          Chinna Rao Lalam
        2. ASF.LICENSE.NOT.GRANTED--HIVE-2617.D843.1.patch
          24 kB
          Phabricator
        3. HIVE-2617.1.patch
          16 kB
          Chinna Rao Lalam

        Activity

          People

            chinnalalam Chinna Rao Lalam
            aniket486 Aniket Namadeo Mokashi
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: