Hive
  1. Hive
  2. HIVE-2617

Insert overwrite table db.tname fails if partition already exists

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major 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).

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

        Activity

        No work has yet been logged on this issue.

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development