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

Exchange partition on external tables should fail with error message when target folder already exists

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.0
    • Fix Version/s: 1.3.0, 2.0.0
    • Component/s: Hive
    • Labels:
      None

      Description

      Steps to repro:

      Create /data/a1/pkey=1 directory with some data in it.
      Create /data/a2/pkey=1 directory with some data in it.
      
      create external table a1 (value string) partitioned by (pkey int) location '/data/a1';
      create external table a2 (value string) partitioned by (pkey int) location '/data/a2';
      alter table a2 add partition (pkey=1);
      alter table a1 exchange partition (pkey=1) with table a2;
      select * from a1 should now fail.
      

      pkey=1 is not a partition of a1 but the folder exists. We should give an error message for that.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                aihuaxu Aihua Xu
                Reporter:
                aihuaxu Aihua Xu
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: