Saving all output to "!!{outputDirectory}!!/rename_partition_location.q.raw". Enter "record" with no arguments to stop it. >>> !run !!{qFileDirectory}!!/rename_partition_location.q >>> -- This test verifies that if the tables location changes, renaming a partition will not change >>> -- the partition location accordingly >>> >>> CREATE TABLE rename_partition_table (key STRING, value STRING) PARTITIONED BY (part STRING) STORED AS RCFILE LOCATION 'pfile:${system:test.tmp.dir}/rename_partition_table'; No rows affected >>> >>> INSERT OVERWRITE TABLE rename_partition_table PARTITION (part = '1') SELECT * FROM src; 'key','value' No rows selected >>> >>> ALTER TABLE rename_partition_table SET LOCATION 'file:${system:test.tmp.dir}/rename_partition_table'; No rows affected >>> >>> ALTER TABLE rename_partition_table PARTITION (part = '1') RENAME TO PARTITION (part = '2'); No rows affected >>> >>> SET hive.exec.post.hooks=org.apache.hadoop.hive.ql.hooks.VerifyPartitionIsNotSubdirectoryOfTableHook; No rows affected >>> >>> SELECT count(*) FROM rename_partition_table where part = '2'; '_c0' '500' 1 row selected >>> >>> SET hive.exec.post.hooks=; No rows affected >>> >>> DROP TABLE rename_partition_table; No rows affected >>> !record