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

Exchange partition not copying data across S3 buckets

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 2.3.0
    • None
    • None
    • None

    Description

      Data is not copied when exchanging partition between two tables in different buckets. Only the metadata is copied over.

      Assuming we have a partitioned table "table1" in s3://myBucket/table1 (I don't think schemas matter in that case so I will just omit them), my code looks like this:

      create table table2 like table1 location 's3://anotherBucket/table2';
      alter table table2 exchange partition (mypartition='partition1') with table table1;

       The behavior is the following:

      • no error e.g. "No rows affected (1.194 seconds)"
      • old partition metadata with provided key removed from table1
      • new partition metadata with the provided key created properly in the table2
      • data still in s3://myBucket/table1/mypartition=partition1

       It works as expected when using the exact same code but with table2 located in the same bucket as table1.

      I have not found any documentation regarding cross-bucket not being supported so I guess this is unwanted behavior. This should probably throw an error if not supported.

       

       

      Attachments

        Activity

          People

            Unassigned Unassigned
            WhoisDavid David Malinge
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: