You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by br...@apache.org on 2014/12/30 21:17:50 UTC

svn commit: r1648595 - in /hive/branches/HIVE-8065: itests/src/test/resources/ ql/src/test/queries/clientpositive/ ql/src/test/results/clientpositive/encrypted/

Author: brock
Date: Tue Dec 30 20:17:50 2014
New Revision: 1648595

URL: http://svn.apache.org/r1648595
Log:
HIVE-8821 - Create unit test where we insert into dynamically partitioned table (Dong Chen via Brock)

Added:
    hive/branches/HIVE-8065/ql/src/test/queries/clientpositive/encryption_insert_partition_dynamic.q
    hive/branches/HIVE-8065/ql/src/test/results/clientpositive/encrypted/encryption_insert_partition_dynamic.q.out
Modified:
    hive/branches/HIVE-8065/itests/src/test/resources/testconfiguration.properties

Modified: hive/branches/HIVE-8065/itests/src/test/resources/testconfiguration.properties
URL: http://svn.apache.org/viewvc/hive/branches/HIVE-8065/itests/src/test/resources/testconfiguration.properties?rev=1648595&r1=1648594&r2=1648595&view=diff
==============================================================================
--- hive/branches/HIVE-8065/itests/src/test/resources/testconfiguration.properties (original)
+++ hive/branches/HIVE-8065/itests/src/test/resources/testconfiguration.properties Tue Dec 30 20:17:50 2014
@@ -272,7 +272,8 @@ minitez.query.files=bucket_map_join_tez1
   vectorized_dynamic_partition_pruning.q
 
 encrypted.query.files.shared=join_unencrypted_encrypted_tbls.q,\
-  encryption_insert_partition_static.q
+  encryption_insert_partition_static.q,\
+  encryption_insert_partition_dynamic.q
 
 beeline.positive.exclude=add_part_exist.q,\
   alter1.q,\

Added: hive/branches/HIVE-8065/ql/src/test/queries/clientpositive/encryption_insert_partition_dynamic.q
URL: http://svn.apache.org/viewvc/hive/branches/HIVE-8065/ql/src/test/queries/clientpositive/encryption_insert_partition_dynamic.q?rev=1648595&view=auto
==============================================================================
--- hive/branches/HIVE-8065/ql/src/test/queries/clientpositive/encryption_insert_partition_dynamic.q (added)
+++ hive/branches/HIVE-8065/ql/src/test/queries/clientpositive/encryption_insert_partition_dynamic.q Tue Dec 30 20:17:50 2014
@@ -0,0 +1,53 @@
+set hive.exec.dynamic.partition.mode=nonstrict;
+set hive.support.concurrency=true;
+set hive.txn.manager=org.apache.hadoop.hive.ql.lockmgr.DbTxnManager;
+set hive.enforce.bucketing=true;
+
+-- SORT_QUERY_RESULTS
+
+-- init
+drop table IF EXISTS encryptedWith128BitsKeyDB.encryptedTable;
+drop table IF EXISTS unencryptedTable;
+
+create table encryptedWith128BitsKeyDB.encryptedTable(value string)
+    partitioned by (key string) clustered by (value) into 2 buckets stored as orc TBLPROPERTIES ('transactional'='true');
+
+create table unencryptedTable(value string)
+    partitioned by (key string) clustered by (value) into 2 buckets stored as orc TBLPROPERTIES ('transactional'='true');
+
+-- insert encrypted table from values
+explain extended insert into table encryptedWith128BitsKeyDB.encryptedTable partition (key) values
+    ('val_501', '501'),
+    ('val_502', '502');
+
+insert into table encryptedWith128BitsKeyDB.encryptedTable partition (key) values
+    ('val_501', '501'),
+    ('val_502', '502');
+
+select * from encryptedWith128BitsKeyDB.encryptedTable order by key;
+
+-- insert encrypted table from unencrypted source
+explain extended from src
+insert into table encryptedWith128BitsKeyDB.encryptedTable partition (key)
+    select value, key limit 2;
+
+from src
+insert into table encryptedWith128BitsKeyDB.encryptedTable partition (key)
+    select value, key limit 2;
+
+select * from encryptedWith128BitsKeyDB.encryptedTable order by key;
+
+-- insert unencrypted table from encrypted source
+explain extended from encryptedWith128BitsKeyDB.encryptedTable
+insert into table unencryptedTable partition (key)
+    select value, key;
+
+from encryptedWith128BitsKeyDB.encryptedTable
+insert into table unencryptedTable partition (key)
+    select value, key;
+
+select * from unencryptedTable order by key;
+
+-- clean up
+drop table encryptedWith128BitsKeyDB.encryptedTable;
+drop table unencryptedTable;
\ No newline at end of file

Added: hive/branches/HIVE-8065/ql/src/test/results/clientpositive/encrypted/encryption_insert_partition_dynamic.q.out
URL: http://svn.apache.org/viewvc/hive/branches/HIVE-8065/ql/src/test/results/clientpositive/encrypted/encryption_insert_partition_dynamic.q.out?rev=1648595&view=auto
==============================================================================
Binary files hive/branches/HIVE-8065/ql/src/test/results/clientpositive/encrypted/encryption_insert_partition_dynamic.q.out (added) and hive/branches/HIVE-8065/ql/src/test/results/clientpositive/encrypted/encryption_insert_partition_dynamic.q.out Tue Dec 30 20:17:50 2014 differ