diff --git itests/hive-unit/src/test/java/org/apache/hadoop/hive/ql/security/authorization/plugin/TestHiveAuthorizerCheckInvocation.java itests/hive-unit/src/test/java/org/apache/hadoop/hive/ql/security/authorization/plugin/TestHiveAuthorizerCheckInvocation.java index 50fe7be..8e93932 100644 --- itests/hive-unit/src/test/java/org/apache/hadoop/hive/ql/security/authorization/plugin/TestHiveAuthorizerCheckInvocation.java +++ itests/hive-unit/src/test/java/org/apache/hadoop/hive/ql/security/authorization/plugin/TestHiveAuthorizerCheckInvocation.java @@ -97,7 +97,7 @@ public static void beforeTest() throws Exception { + " (i int, j int, k string) partitioned by (city string, `date` string) "); runCmd("create database " + dbName); // Need a separate table for ACID testing since it has to be bucketed and it has to be Acid - runCmd("create table " + acidTableName + " (i int, j int) clustered by (i) into 2 buckets " + + runCmd("create table " + acidTableName + " (i int, j int, k int) clustered by (k) into 2 buckets " + "stored as orc TBLPROPERTIES ('transactional'='true')"); } @@ -273,7 +273,7 @@ public void testUpdateSomeColumnsUsed() throws HiveAuthzPluginException, List inputs = io.getLeft(); assertEquals(1, inputs.size()); tableObj = inputs.get(0); - assertEquals(1, tableObj.getColumns().size()); + assertEquals(2, tableObj.getColumns().size()); assertEquals("j", tableObj.getColumns().get(0)); } diff --git itests/hive-unit/src/test/java/org/apache/hadoop/hive/ql/txn/compactor/TestCompactor.java itests/hive-unit/src/test/java/org/apache/hadoop/hive/ql/txn/compactor/TestCompactor.java index 059e01e..c682c3e 100644 --- itests/hive-unit/src/test/java/org/apache/hadoop/hive/ql/txn/compactor/TestCompactor.java +++ itests/hive-unit/src/test/java/org/apache/hadoop/hive/ql/txn/compactor/TestCompactor.java @@ -371,7 +371,7 @@ public void dynamicPartitioningDelete() throws Exception { executeStatementOnDriver("insert into " + tblName + " partition (ds) values (1, 'fred', " + "'today'), (2, 'wilma', 'yesterday')", driver); - executeStatementOnDriver("update " + tblName + " set a = 3", driver); + executeStatementOnDriver("update " + tblName + " set b = 'fred' where a = 1", driver); executeStatementOnDriver("delete from " + tblName + " where b = 'fred'", driver); diff --git ql/src/java/org/apache/hadoop/hive/ql/ErrorMsg.java ql/src/java/org/apache/hadoop/hive/ql/ErrorMsg.java index 68b23e7..541531c 100644 --- ql/src/java/org/apache/hadoop/hive/ql/ErrorMsg.java +++ ql/src/java/org/apache/hadoop/hive/ql/ErrorMsg.java @@ -429,6 +429,7 @@ "Alter table partition type {0} does not support cascade", true), DROP_NATIVE_FUNCTION(10301, "Cannot drop native function"), + UPDATE_CANNOT_UPDATE_BUCKET_VALUE(10302, "Updating values of bucketing columns is not supported. Column {0}.", true), //========================== 20000 range starts here ========================// SCRIPT_INIT_ERROR(20000, "Unable to initialize custom script."), diff --git ql/src/java/org/apache/hadoop/hive/ql/parse/UpdateDeleteSemanticAnalyzer.java ql/src/java/org/apache/hadoop/hive/ql/parse/UpdateDeleteSemanticAnalyzer.java index 4eedb14..7af68de 100644 --- ql/src/java/org/apache/hadoop/hive/ql/parse/UpdateDeleteSemanticAnalyzer.java +++ ql/src/java/org/apache/hadoop/hive/ql/parse/UpdateDeleteSemanticAnalyzer.java @@ -140,6 +140,7 @@ private void reparseAndSuperAnalyze(ASTNode tree) throws SemanticException { } List partCols = mTable.getPartCols(); + List bucketingCols = mTable.getBucketCols(); rewrittenQueryStr.append("insert into table "); rewrittenQueryStr.append(getDotName(tableName)); @@ -199,7 +200,10 @@ private void reparseAndSuperAnalyze(ASTNode tree) throws SemanticException { } } } - + //updating bucket column should move row from one file to another - not supported + if(bucketingCols != null && bucketingCols.contains(columnName)) { + throw new SemanticException(ErrorMsg.UPDATE_CANNOT_UPDATE_BUCKET_VALUE,columnName); + } // This means that in UPDATE T SET x = _something_ // _something_ can be whatever is supported in SELECT _something_ setCols.put(columnName, (ASTNode)assignment.getChildren().get(1)); diff --git ql/src/test/org/apache/hadoop/hive/ql/parse/TestUpdateDeleteSemanticAnalyzer.java ql/src/test/org/apache/hadoop/hive/ql/parse/TestUpdateDeleteSemanticAnalyzer.java index 7138d51..d0ab011 100644 --- ql/src/test/org/apache/hadoop/hive/ql/parse/TestUpdateDeleteSemanticAnalyzer.java +++ ql/src/test/org/apache/hadoop/hive/ql/parse/TestUpdateDeleteSemanticAnalyzer.java @@ -135,7 +135,7 @@ public void testDeleteOnePartitionWhere() throws Exception { @Test public void testUpdateAllNonPartitioned() throws Exception { try { - ReturnInfo rc = parseAndAnalyze("update T set a = 5", "testUpdateAllNonPartitioned"); + ReturnInfo rc = parseAndAnalyze("update T set b = 5", "testUpdateAllNonPartitioned"); LOG.info(explain((SemanticAnalyzer)rc.sem, rc.plan, rc.ast.dump())); } finally { cleanupTables(); @@ -145,7 +145,7 @@ public void testUpdateAllNonPartitioned() throws Exception { @Test public void testUpdateAllNonPartitionedWhere() throws Exception { try { - ReturnInfo rc = parseAndAnalyze("update T set a = 5 where b > 5", + ReturnInfo rc = parseAndAnalyze("update T set b = 5 where b > 5", "testUpdateAllNonPartitionedWhere"); LOG.info(explain((SemanticAnalyzer)rc.sem, rc.plan, rc.ast.dump())); } finally { @@ -156,7 +156,7 @@ public void testUpdateAllNonPartitionedWhere() throws Exception { @Test public void testUpdateAllPartitioned() throws Exception { try { - ReturnInfo rc = parseAndAnalyze("update U set a = 5", "testUpdateAllPartitioned"); + ReturnInfo rc = parseAndAnalyze("update U set b = 5", "testUpdateAllPartitioned"); LOG.info(explain((SemanticAnalyzer)rc.sem, rc.plan, rc.ast.dump())); } finally { cleanupTables(); @@ -166,7 +166,7 @@ public void testUpdateAllPartitioned() throws Exception { @Test public void testUpdateAllPartitionedWhere() throws Exception { try { - ReturnInfo rc = parseAndAnalyze("update U set a = 5 where b > 5", + ReturnInfo rc = parseAndAnalyze("update U set b = 5 where b > 5", "testUpdateAllPartitionedWhere"); LOG.info(explain((SemanticAnalyzer)rc.sem, rc.plan, rc.ast.dump())); } finally { @@ -177,7 +177,7 @@ public void testUpdateAllPartitionedWhere() throws Exception { @Test public void testUpdateOnePartition() throws Exception { try { - ReturnInfo rc = parseAndAnalyze("update U set a = 5 where ds = 'today'", + ReturnInfo rc = parseAndAnalyze("update U set b = 5 where ds = 'today'", "testUpdateOnePartition"); LOG.info(explain((SemanticAnalyzer)rc.sem, rc.plan, rc.ast.dump())); } finally { @@ -188,7 +188,7 @@ public void testUpdateOnePartition() throws Exception { @Test public void testUpdateOnePartitionWhere() throws Exception { try { - ReturnInfo rc = parseAndAnalyze("update U set a = 5 where ds = 'today' and b > 5", + ReturnInfo rc = parseAndAnalyze("update U set b = 5 where ds = 'today' and b > 5", "testUpdateOnePartitionWhere"); LOG.info(explain((SemanticAnalyzer)rc.sem, rc.plan, rc.ast.dump())); } finally { @@ -266,7 +266,7 @@ private ReturnInfo parseAndAnalyze(String query, String testName) db = sem.getDb(); // I have to create the tables here (rather than in setup()) because I need the Hive - // connection, which is conviently created by the semantic analyzer. + // connection, which is conveniently created by the semantic analyzer. Map params = new HashMap(1); params.put(hive_metastoreConstants.TABLE_IS_TRANSACTIONAL, "true"); db.createTable("T", Arrays.asList("a", "b"), null, OrcInputFormat.class, diff --git ql/src/test/queries/clientnegative/authorization_update_noupdatepriv.q ql/src/test/queries/clientnegative/authorization_update_noupdatepriv.q index 7065527..c00c0eb 100644 --- ql/src/test/queries/clientnegative/authorization_update_noupdatepriv.q +++ ql/src/test/queries/clientnegative/authorization_update_noupdatepriv.q @@ -9,7 +9,7 @@ set hive.enforce.bucketing=true; -- check update without update priv -create table auth_noupd(i int) clustered by (i) into 2 buckets stored as orc TBLPROPERTIES ('transactional'='true'); +create table auth_noupd(i int, j int) clustered by (j) into 2 buckets stored as orc TBLPROPERTIES ('transactional'='true'); set user.name=user1; update auth_noupd set i = 0 where i > 0; diff --git ql/src/test/queries/clientnegative/update_bucket_col.q ql/src/test/queries/clientnegative/update_bucket_col.q new file mode 100644 index 0000000..515e024 --- /dev/null +++ ql/src/test/queries/clientnegative/update_bucket_col.q @@ -0,0 +1,7 @@ +set hive.support.concurrency=true; +set hive.txn.manager=org.apache.hadoop.hive.ql.lockmgr.DbTxnManager; +set hive.enforce.bucketing=true; + +create table foo(a int, b varchar(128)) partitioned by (ds string) clustered by (a) into 2 buckets stored as orc TBLPROPERTIES ('transactional'='true'); + +update foo set a = 5; \ No newline at end of file diff --git ql/src/test/queries/clientpositive/authorization_update.q ql/src/test/queries/clientpositive/authorization_update.q index 3601e67..da1054e 100644 --- ql/src/test/queries/clientpositive/authorization_update.q +++ ql/src/test/queries/clientpositive/authorization_update.q @@ -9,7 +9,7 @@ set hive.enforce.bucketing=true; set user.name=user1; -- current user has been set (comment line before the set cmd is resulting in parse error!!) -CREATE TABLE t_auth_up(i int) clustered by (i) into 2 buckets stored as orc TBLPROPERTIES ('transactional'='true'); +CREATE TABLE t_auth_up(i int, j int) clustered by (i) into 2 buckets stored as orc TBLPROPERTIES ('transactional'='true'); CREATE TABLE t_select(i int); GRANT ALL ON TABLE t_select TO ROLE public; @@ -24,4 +24,4 @@ SHOW GRANT ON TABLE t_auth_up; set user.name=userWIns; -update t_auth_up set i = 0 where i > 0; +update t_auth_up set j = 0 where i > 0; diff --git ql/src/test/queries/clientpositive/authorization_update_own_table.q ql/src/test/queries/clientpositive/authorization_update_own_table.q index 18a643c..ace1ce2 100644 --- ql/src/test/queries/clientpositive/authorization_update_own_table.q +++ ql/src/test/queries/clientpositive/authorization_update_own_table.q @@ -9,8 +9,8 @@ set hive.enforce.bucketing=true; set user.name=user1; -create table auth_noupd(i int) clustered by (i) into 2 buckets stored as orc TBLPROPERTIES ('transactional'='true'); -update auth_noupd set i = 0 where i > 0; +create table auth_noupd(i int, j int) clustered by (i) into 2 buckets stored as orc TBLPROPERTIES ('transactional'='true'); +update auth_noupd set j = 0 where i > 0; set user.name=hive_admin_user; set role admin; diff --git ql/src/test/queries/clientpositive/dynpart_sort_optimization_acid.q ql/src/test/queries/clientpositive/dynpart_sort_optimization_acid.q index f2c0f0b..a2f2c77 100644 --- ql/src/test/queries/clientpositive/dynpart_sort_optimization_acid.q +++ ql/src/test/queries/clientpositive/dynpart_sort_optimization_acid.q @@ -14,12 +14,12 @@ select count(*) from acid where ds='2008-04-08'; insert into table acid partition(ds='2008-04-08') values("foo", "bar"); select count(*) from acid where ds='2008-04-08'; -explain update acid set key = 'foo' where value = 'bar' and ds='2008-04-08'; -update acid set key = 'foo' where value = 'bar' and ds='2008-04-08'; +explain update acid set value = 'bar' where key = 'foo' and ds='2008-04-08'; +update acid set value = 'bar' where key = 'foo' and ds='2008-04-08'; select count(*) from acid where ds='2008-04-08'; -explain update acid set key = 'foo' where value = 'bar' and ds in ('2008-04-08'); -update acid set key = 'foo' where value = 'bar' and ds in ('2008-04-08'); +explain update acid set value = 'bar' where key = 'foo' and ds in ('2008-04-08'); +update acid set value = 'bar' where key = 'foo' and ds in ('2008-04-08'); select count(*) from acid where ds in ('2008-04-08'); delete from acid where key = 'foo' and ds='2008-04-08'; @@ -36,12 +36,12 @@ select count(*) from acid where ds='2008-04-08'; insert into table acid partition(ds='2008-04-08') values("foo", "bar"); select count(*) from acid where ds='2008-04-08'; -explain update acid set key = 'foo' where value = 'bar' and ds='2008-04-08'; -update acid set key = 'foo' where value = 'bar' and ds='2008-04-08'; +explain update acid set value = 'bar' where key = 'foo' and ds='2008-04-08'; +update acid set value = 'bar' where key = 'foo' and ds='2008-04-08'; select count(*) from acid where ds='2008-04-08'; -explain update acid set key = 'foo' where value = 'bar' and ds in ('2008-04-08'); -update acid set key = 'foo' where value = 'bar' and ds in ('2008-04-08'); +explain update acid set value = 'bar' where key = 'foo' and ds in ('2008-04-08'); +update acid set value = 'bar' where key = 'foo' and ds in ('2008-04-08'); select count(*) from acid where ds in ('2008-04-08'); delete from acid where key = 'foo' and ds='2008-04-08'; @@ -58,12 +58,12 @@ select count(*) from acid where ds='2008-04-08' and hr=11; insert into table acid partition(ds='2008-04-08',hr=11) values("foo", "bar"); select count(*) from acid where ds='2008-04-08' and hr=11; -explain update acid set key = 'foo' where value = 'bar' and ds='2008-04-08' and hr=11; -update acid set key = 'foo' where value = 'bar' and ds='2008-04-08' and hr=11; +explain update acid set value = 'bar' where key = 'foo' and ds='2008-04-08' and hr=11; +update acid set value = 'bar' where key = 'foo' and ds='2008-04-08' and hr=11; select count(*) from acid where ds='2008-04-08' and hr=11; -explain update acid set key = 'foo' where value = 'bar' and ds='2008-04-08' and hr>=11; -update acid set key = 'foo' where value = 'bar' and ds='2008-04-08' and hr>=11; +explain update acid set value = 'bar' where key = 'foo' and ds='2008-04-08' and hr>=11; +update acid set value = 'bar' where key = 'foo' and ds='2008-04-08' and hr>=11; select count(*) from acid where ds='2008-04-08' and hr>=11; delete from acid where key = 'foo' and ds='2008-04-08' and hr=11; @@ -80,12 +80,12 @@ select count(*) from acid where ds='2008-04-08' and hr=11; insert into table acid partition(ds='2008-04-08',hr=11) values("foo", "bar"); select count(*) from acid where ds='2008-04-08' and hr=11; -explain update acid set key = 'foo' where value = 'bar' and ds='2008-04-08' and hr=11; -update acid set key = 'foo' where value = 'bar' and ds='2008-04-08' and hr=11; +explain update acid set value = 'bar' where key = 'foo' and ds='2008-04-08' and hr=11; +update acid set value = 'bar' where key = 'foo' and ds='2008-04-08' and hr=11; select count(*) from acid where ds='2008-04-08' and hr=11; -explain update acid set key = 'foo' where value = 'bar' and ds='2008-04-08' and hr>=11; -update acid set key = 'foo' where value = 'bar' and ds='2008-04-08' and hr>=11; +explain update acid set value = 'bar' where key = 'foo' and ds='2008-04-08' and hr>=11; +update acid set value = 'bar' where key = 'foo' and ds='2008-04-08' and hr>=11; select count(*) from acid where ds='2008-04-08' and hr>=11; delete from acid where key = 'foo' and ds='2008-04-08' and hr=11; @@ -103,12 +103,12 @@ select count(*) from acid where ds='2008-04-08' and hr=11; insert into table acid partition(ds='2008-04-08',hr=11) values("foo", "bar"); select count(*) from acid where ds='2008-04-08' and hr=11; -explain update acid set key = 'foo' where value = 'bar' and ds='2008-04-08' and hr=11; -update acid set key = 'foo' where value = 'bar' and ds='2008-04-08' and hr=11; +explain update acid set value = 'bar' where key = 'foo' and ds='2008-04-08' and hr=11; +update acid set value = 'bar' where key = 'foo' and ds='2008-04-08' and hr=11; select count(*) from acid where ds='2008-04-08' and hr=11; -explain update acid set key = 'foo' where value = 'bar' and ds='2008-04-08' and hr>=11; -update acid set key = 'foo' where value = 'bar' and ds='2008-04-08' and hr>=11; +explain update acid set value = 'bar' where key = 'foo' and ds='2008-04-08' and hr>=11; +update acid set value = 'bar' where key = 'foo' and ds='2008-04-08' and hr>=11; select count(*) from acid where ds='2008-04-08' and hr>=11; delete from acid where key = 'foo' and ds='2008-04-08' and hr=11; diff --git ql/src/test/queries/clientpositive/update_all_types.q ql/src/test/queries/clientpositive/update_all_types.q index 14ffc59..7da3a9a 100644 --- ql/src/test/queries/clientpositive/update_all_types.q +++ ql/src/test/queries/clientpositive/update_all_types.q @@ -5,6 +5,7 @@ set hive.enforce.bucketing=true; create table acid_uat(ti tinyint, si smallint, i int, + j int, bi bigint, f float, d double, @@ -20,6 +21,7 @@ insert into table acid_uat select ctinyint, csmallint, cint, + cint j, cbigint, cfloat, cdouble, @@ -37,7 +39,7 @@ select * from acid_uat order by i; update acid_uat set ti = 1, si = 2, - i = 3, + j = 3, bi = 4, f = 3.14, d = 6.28, diff --git ql/src/test/queries/clientpositive/update_tmp_table.q ql/src/test/queries/clientpositive/update_tmp_table.q index 281357f..a896ac7 100644 --- ql/src/test/queries/clientpositive/update_tmp_table.q +++ ql/src/test/queries/clientpositive/update_tmp_table.q @@ -8,7 +8,7 @@ insert into table acid_utt select cint, cast(cstring1 as varchar(128)) from allt select a,b from acid_utt order by a; -update acid_utt set b = 'fred' where b = '0ruyd6Y50JpdGRf6HqD'; +update acid_utt set a = 'fred' where b = '0ruyd6Y50JpdGRf6HqD'; select * from acid_utt order by a; diff --git ql/src/test/results/clientnegative/authorization_update_noupdatepriv.q.out ql/src/test/results/clientnegative/authorization_update_noupdatepriv.q.out index c39c6d7..e8ff975 100644 --- ql/src/test/results/clientnegative/authorization_update_noupdatepriv.q.out +++ ql/src/test/results/clientnegative/authorization_update_noupdatepriv.q.out @@ -1,10 +1,10 @@ PREHOOK: query: -- check update without update priv -create table auth_noupd(i int) clustered by (i) into 2 buckets stored as orc TBLPROPERTIES ('transactional'='true') +create table auth_noupd(i int, j int) clustered by (j) into 2 buckets stored as orc TBLPROPERTIES ('transactional'='true') PREHOOK: type: CREATETABLE PREHOOK: Output: database:default PREHOOK: Output: default@auth_noupd POSTHOOK: query: -- check update without update priv -create table auth_noupd(i int) clustered by (i) into 2 buckets stored as orc TBLPROPERTIES ('transactional'='true') +create table auth_noupd(i int, j int) clustered by (j) into 2 buckets stored as orc TBLPROPERTIES ('transactional'='true') POSTHOOK: type: CREATETABLE POSTHOOK: Output: database:default POSTHOOK: Output: default@auth_noupd diff --git ql/src/test/results/clientnegative/update_bucket_col.q.out ql/src/test/results/clientnegative/update_bucket_col.q.out new file mode 100644 index 0000000..41f038e --- /dev/null +++ ql/src/test/results/clientnegative/update_bucket_col.q.out @@ -0,0 +1,9 @@ +PREHOOK: query: create table foo(a int, b varchar(128)) partitioned by (ds string) clustered by (a) into 2 buckets stored as orc TBLPROPERTIES ('transactional'='true') +PREHOOK: type: CREATETABLE +PREHOOK: Output: database:default +PREHOOK: Output: default@foo +POSTHOOK: query: create table foo(a int, b varchar(128)) partitioned by (ds string) clustered by (a) into 2 buckets stored as orc TBLPROPERTIES ('transactional'='true') +POSTHOOK: type: CREATETABLE +POSTHOOK: Output: database:default +POSTHOOK: Output: default@foo +FAILED: SemanticException [Error 10302]: Updating values of bucketing columns is not supported. Column a. diff --git ql/src/test/results/clientpositive/authorization_update.q.out ql/src/test/results/clientpositive/authorization_update.q.out index ef65b33..dc67ae3 100644 --- ql/src/test/results/clientpositive/authorization_update.q.out +++ ql/src/test/results/clientpositive/authorization_update.q.out @@ -1,12 +1,12 @@ PREHOOK: query: -- current user has been set (comment line before the set cmd is resulting in parse error!!) -CREATE TABLE t_auth_up(i int) clustered by (i) into 2 buckets stored as orc TBLPROPERTIES ('transactional'='true') +CREATE TABLE t_auth_up(i int, j int) clustered by (i) into 2 buckets stored as orc TBLPROPERTIES ('transactional'='true') PREHOOK: type: CREATETABLE PREHOOK: Output: database:default PREHOOK: Output: default@t_auth_up POSTHOOK: query: -- current user has been set (comment line before the set cmd is resulting in parse error!!) -CREATE TABLE t_auth_up(i int) clustered by (i) into 2 buckets stored as orc TBLPROPERTIES ('transactional'='true') +CREATE TABLE t_auth_up(i int, j int) clustered by (i) into 2 buckets stored as orc TBLPROPERTIES ('transactional'='true') POSTHOOK: type: CREATETABLE POSTHOOK: Output: database:default POSTHOOK: Output: default@t_auth_up @@ -52,11 +52,11 @@ default t_auth_up user1 USER SELECT true -1 user1 default t_auth_up user1 USER UPDATE true -1 user1 default t_auth_up userWIns USER SELECT false -1 user1 default t_auth_up userWIns USER UPDATE false -1 user1 -PREHOOK: query: update t_auth_up set i = 0 where i > 0 +PREHOOK: query: update t_auth_up set j = 0 where i > 0 PREHOOK: type: QUERY PREHOOK: Input: default@t_auth_up PREHOOK: Output: default@t_auth_up -POSTHOOK: query: update t_auth_up set i = 0 where i > 0 +POSTHOOK: query: update t_auth_up set j = 0 where i > 0 POSTHOOK: type: QUERY POSTHOOK: Input: default@t_auth_up POSTHOOK: Output: default@t_auth_up diff --git ql/src/test/results/clientpositive/authorization_update_own_table.q.out ql/src/test/results/clientpositive/authorization_update_own_table.q.out index e4b5f0b..2ef03ad 100644 --- ql/src/test/results/clientpositive/authorization_update_own_table.q.out +++ ql/src/test/results/clientpositive/authorization_update_own_table.q.out @@ -1,16 +1,16 @@ -PREHOOK: query: create table auth_noupd(i int) clustered by (i) into 2 buckets stored as orc TBLPROPERTIES ('transactional'='true') +PREHOOK: query: create table auth_noupd(i int, j int) clustered by (i) into 2 buckets stored as orc TBLPROPERTIES ('transactional'='true') PREHOOK: type: CREATETABLE PREHOOK: Output: database:default PREHOOK: Output: default@auth_noupd -POSTHOOK: query: create table auth_noupd(i int) clustered by (i) into 2 buckets stored as orc TBLPROPERTIES ('transactional'='true') +POSTHOOK: query: create table auth_noupd(i int, j int) clustered by (i) into 2 buckets stored as orc TBLPROPERTIES ('transactional'='true') POSTHOOK: type: CREATETABLE POSTHOOK: Output: database:default POSTHOOK: Output: default@auth_noupd -PREHOOK: query: update auth_noupd set i = 0 where i > 0 +PREHOOK: query: update auth_noupd set j = 0 where i > 0 PREHOOK: type: QUERY PREHOOK: Input: default@auth_noupd PREHOOK: Output: default@auth_noupd -POSTHOOK: query: update auth_noupd set i = 0 where i > 0 +POSTHOOK: query: update auth_noupd set j = 0 where i > 0 POSTHOOK: type: QUERY POSTHOOK: Input: default@auth_noupd POSTHOOK: Output: default@auth_noupd diff --git ql/src/test/results/clientpositive/dynpart_sort_optimization_acid.q.out ql/src/test/results/clientpositive/dynpart_sort_optimization_acid.q.out index 619200d..bcc03cf 100644 --- ql/src/test/results/clientpositive/dynpart_sort_optimization_acid.q.out +++ ql/src/test/results/clientpositive/dynpart_sort_optimization_acid.q.out @@ -65,9 +65,9 @@ POSTHOOK: Input: default@acid POSTHOOK: Input: default@acid@ds=2008-04-08 #### A masked pattern was here #### 1001 -PREHOOK: query: explain update acid set key = 'foo' where value = 'bar' and ds='2008-04-08' +PREHOOK: query: explain update acid set value = 'bar' where key = 'foo' and ds='2008-04-08' PREHOOK: type: QUERY -POSTHOOK: query: explain update acid set key = 'foo' where value = 'bar' and ds='2008-04-08' +POSTHOOK: query: explain update acid set value = 'bar' where key = 'foo' and ds='2008-04-08' POSTHOOK: type: QUERY STAGE DEPENDENCIES: Stage-1 is a root stage @@ -81,18 +81,18 @@ STAGE PLANS: TableScan alias: acid Filter Operator - predicate: (value = 'bar') (type: boolean) + predicate: (key = 'foo') (type: boolean) Select Operator - expressions: ROW__ID (type: struct), 'foo' (type: string) - outputColumnNames: _col0, _col1 + expressions: ROW__ID (type: struct), 'bar' (type: string) + outputColumnNames: _col0, _col2 Reduce Output Operator key expressions: _col0 (type: struct) sort order: + Map-reduce partition columns: UDFToInteger(_col0) (type: int) - value expressions: _col1 (type: string) + value expressions: _col2 (type: string) Reduce Operator Tree: Select Operator - expressions: KEY.reducesinkkey0 (type: struct), VALUE._col0 (type: string), 'bar' (type: string), '2008-04-08' (type: string) + expressions: KEY.reducesinkkey0 (type: struct), 'foo' (type: string), VALUE._col1 (type: string), '2008-04-08' (type: string) outputColumnNames: _col0, _col1, _col2, _col3 File Output Operator compressed: false @@ -117,12 +117,12 @@ STAGE PLANS: Stage: Stage-2 Stats-Aggr Operator -PREHOOK: query: update acid set key = 'foo' where value = 'bar' and ds='2008-04-08' +PREHOOK: query: update acid set value = 'bar' where key = 'foo' and ds='2008-04-08' PREHOOK: type: QUERY PREHOOK: Input: default@acid PREHOOK: Input: default@acid@ds=2008-04-08 PREHOOK: Output: default@acid@ds=2008-04-08 -POSTHOOK: query: update acid set key = 'foo' where value = 'bar' and ds='2008-04-08' +POSTHOOK: query: update acid set value = 'bar' where key = 'foo' and ds='2008-04-08' POSTHOOK: type: QUERY POSTHOOK: Input: default@acid POSTHOOK: Input: default@acid@ds=2008-04-08 @@ -138,9 +138,9 @@ POSTHOOK: Input: default@acid POSTHOOK: Input: default@acid@ds=2008-04-08 #### A masked pattern was here #### 1001 -PREHOOK: query: explain update acid set key = 'foo' where value = 'bar' and ds in ('2008-04-08') +PREHOOK: query: explain update acid set value = 'bar' where key = 'foo' and ds in ('2008-04-08') PREHOOK: type: QUERY -POSTHOOK: query: explain update acid set key = 'foo' where value = 'bar' and ds in ('2008-04-08') +POSTHOOK: query: explain update acid set value = 'bar' where key = 'foo' and ds in ('2008-04-08') POSTHOOK: type: QUERY STAGE DEPENDENCIES: Stage-1 is a root stage @@ -154,18 +154,18 @@ STAGE PLANS: TableScan alias: acid Filter Operator - predicate: (value = 'bar') (type: boolean) + predicate: (key = 'foo') (type: boolean) Select Operator - expressions: ROW__ID (type: struct), 'foo' (type: string), ds (type: string) - outputColumnNames: _col0, _col1, _col3 + expressions: ROW__ID (type: struct), 'bar' (type: string), ds (type: string) + outputColumnNames: _col0, _col2, _col3 Reduce Output Operator key expressions: _col0 (type: struct) sort order: + Map-reduce partition columns: UDFToInteger(_col0) (type: int) - value expressions: _col1 (type: string), _col3 (type: string) + value expressions: _col2 (type: string), _col3 (type: string) Reduce Operator Tree: Select Operator - expressions: KEY.reducesinkkey0 (type: struct), VALUE._col0 (type: string), 'bar' (type: string), VALUE._col2 (type: string) + expressions: KEY.reducesinkkey0 (type: struct), 'foo' (type: string), VALUE._col1 (type: string), VALUE._col2 (type: string) outputColumnNames: _col0, _col1, _col2, _col3 File Output Operator compressed: false @@ -190,12 +190,12 @@ STAGE PLANS: Stage: Stage-2 Stats-Aggr Operator -PREHOOK: query: update acid set key = 'foo' where value = 'bar' and ds in ('2008-04-08') +PREHOOK: query: update acid set value = 'bar' where key = 'foo' and ds in ('2008-04-08') PREHOOK: type: QUERY PREHOOK: Input: default@acid PREHOOK: Input: default@acid@ds=2008-04-08 PREHOOK: Output: default@acid@ds=2008-04-08 -POSTHOOK: query: update acid set key = 'foo' where value = 'bar' and ds in ('2008-04-08') +POSTHOOK: query: update acid set value = 'bar' where key = 'foo' and ds in ('2008-04-08') POSTHOOK: type: QUERY POSTHOOK: Input: default@acid POSTHOOK: Input: default@acid@ds=2008-04-08 @@ -303,9 +303,9 @@ POSTHOOK: Input: default@acid POSTHOOK: Input: default@acid@ds=2008-04-08 #### A masked pattern was here #### 1001 -PREHOOK: query: explain update acid set key = 'foo' where value = 'bar' and ds='2008-04-08' +PREHOOK: query: explain update acid set value = 'bar' where key = 'foo' and ds='2008-04-08' PREHOOK: type: QUERY -POSTHOOK: query: explain update acid set key = 'foo' where value = 'bar' and ds='2008-04-08' +POSTHOOK: query: explain update acid set value = 'bar' where key = 'foo' and ds='2008-04-08' POSTHOOK: type: QUERY STAGE DEPENDENCIES: Stage-1 is a root stage @@ -319,18 +319,18 @@ STAGE PLANS: TableScan alias: acid Filter Operator - predicate: (value = 'bar') (type: boolean) + predicate: (key = 'foo') (type: boolean) Select Operator - expressions: ROW__ID (type: struct), 'foo' (type: string) - outputColumnNames: _col0, _col1 + expressions: ROW__ID (type: struct), 'bar' (type: string) + outputColumnNames: _col0, _col2 Reduce Output Operator key expressions: _col0 (type: struct) sort order: + Map-reduce partition columns: UDFToInteger(_col0) (type: int) - value expressions: _col1 (type: string) + value expressions: _col2 (type: string) Reduce Operator Tree: Select Operator - expressions: KEY.reducesinkkey0 (type: struct), VALUE._col0 (type: string), 'bar' (type: string), '2008-04-08' (type: string) + expressions: KEY.reducesinkkey0 (type: struct), 'foo' (type: string), VALUE._col1 (type: string), '2008-04-08' (type: string) outputColumnNames: _col0, _col1, _col2, _col3 File Output Operator compressed: false @@ -355,12 +355,12 @@ STAGE PLANS: Stage: Stage-2 Stats-Aggr Operator -PREHOOK: query: update acid set key = 'foo' where value = 'bar' and ds='2008-04-08' +PREHOOK: query: update acid set value = 'bar' where key = 'foo' and ds='2008-04-08' PREHOOK: type: QUERY PREHOOK: Input: default@acid PREHOOK: Input: default@acid@ds=2008-04-08 PREHOOK: Output: default@acid@ds=2008-04-08 -POSTHOOK: query: update acid set key = 'foo' where value = 'bar' and ds='2008-04-08' +POSTHOOK: query: update acid set value = 'bar' where key = 'foo' and ds='2008-04-08' POSTHOOK: type: QUERY POSTHOOK: Input: default@acid POSTHOOK: Input: default@acid@ds=2008-04-08 @@ -376,9 +376,9 @@ POSTHOOK: Input: default@acid POSTHOOK: Input: default@acid@ds=2008-04-08 #### A masked pattern was here #### 1001 -PREHOOK: query: explain update acid set key = 'foo' where value = 'bar' and ds in ('2008-04-08') +PREHOOK: query: explain update acid set value = 'bar' where key = 'foo' and ds in ('2008-04-08') PREHOOK: type: QUERY -POSTHOOK: query: explain update acid set key = 'foo' where value = 'bar' and ds in ('2008-04-08') +POSTHOOK: query: explain update acid set value = 'bar' where key = 'foo' and ds in ('2008-04-08') POSTHOOK: type: QUERY STAGE DEPENDENCIES: Stage-1 is a root stage @@ -392,18 +392,18 @@ STAGE PLANS: TableScan alias: acid Filter Operator - predicate: (value = 'bar') (type: boolean) + predicate: (key = 'foo') (type: boolean) Select Operator - expressions: ROW__ID (type: struct), 'foo' (type: string), ds (type: string) - outputColumnNames: _col0, _col1, _col3 + expressions: ROW__ID (type: struct), 'bar' (type: string), ds (type: string) + outputColumnNames: _col0, _col2, _col3 Reduce Output Operator key expressions: _col0 (type: struct) sort order: + Map-reduce partition columns: UDFToInteger(_col0) (type: int) - value expressions: _col1 (type: string), _col3 (type: string) + value expressions: _col2 (type: string), _col3 (type: string) Reduce Operator Tree: Select Operator - expressions: KEY.reducesinkkey0 (type: struct), VALUE._col0 (type: string), 'bar' (type: string), VALUE._col2 (type: string) + expressions: KEY.reducesinkkey0 (type: struct), 'foo' (type: string), VALUE._col1 (type: string), VALUE._col2 (type: string) outputColumnNames: _col0, _col1, _col2, _col3 File Output Operator compressed: false @@ -428,12 +428,12 @@ STAGE PLANS: Stage: Stage-2 Stats-Aggr Operator -PREHOOK: query: update acid set key = 'foo' where value = 'bar' and ds in ('2008-04-08') +PREHOOK: query: update acid set value = 'bar' where key = 'foo' and ds in ('2008-04-08') PREHOOK: type: QUERY PREHOOK: Input: default@acid PREHOOK: Input: default@acid@ds=2008-04-08 PREHOOK: Output: default@acid@ds=2008-04-08 -POSTHOOK: query: update acid set key = 'foo' where value = 'bar' and ds in ('2008-04-08') +POSTHOOK: query: update acid set value = 'bar' where key = 'foo' and ds in ('2008-04-08') POSTHOOK: type: QUERY POSTHOOK: Input: default@acid POSTHOOK: Input: default@acid@ds=2008-04-08 @@ -547,9 +547,9 @@ POSTHOOK: Input: default@acid POSTHOOK: Input: default@acid@ds=2008-04-08/hr=11 #### A masked pattern was here #### 501 -PREHOOK: query: explain update acid set key = 'foo' where value = 'bar' and ds='2008-04-08' and hr=11 +PREHOOK: query: explain update acid set value = 'bar' where key = 'foo' and ds='2008-04-08' and hr=11 PREHOOK: type: QUERY -POSTHOOK: query: explain update acid set key = 'foo' where value = 'bar' and ds='2008-04-08' and hr=11 +POSTHOOK: query: explain update acid set value = 'bar' where key = 'foo' and ds='2008-04-08' and hr=11 POSTHOOK: type: QUERY STAGE DEPENDENCIES: Stage-1 is a root stage @@ -563,18 +563,18 @@ STAGE PLANS: TableScan alias: acid Filter Operator - predicate: (value = 'bar') (type: boolean) + predicate: (key = 'foo') (type: boolean) Select Operator - expressions: ROW__ID (type: struct), 'foo' (type: string) - outputColumnNames: _col0, _col1 + expressions: ROW__ID (type: struct), 'bar' (type: string) + outputColumnNames: _col0, _col2 Reduce Output Operator key expressions: _col0 (type: struct) sort order: + Map-reduce partition columns: UDFToInteger(_col0) (type: int) - value expressions: _col1 (type: string) + value expressions: _col2 (type: string) Reduce Operator Tree: Select Operator - expressions: KEY.reducesinkkey0 (type: struct), VALUE._col0 (type: string), 'bar' (type: string), '2008-04-08' (type: string), 11 (type: int) + expressions: KEY.reducesinkkey0 (type: struct), 'foo' (type: string), VALUE._col1 (type: string), '2008-04-08' (type: string), 11 (type: int) outputColumnNames: _col0, _col1, _col2, _col3, _col4 File Output Operator compressed: false @@ -600,12 +600,12 @@ STAGE PLANS: Stage: Stage-2 Stats-Aggr Operator -PREHOOK: query: update acid set key = 'foo' where value = 'bar' and ds='2008-04-08' and hr=11 +PREHOOK: query: update acid set value = 'bar' where key = 'foo' and ds='2008-04-08' and hr=11 PREHOOK: type: QUERY PREHOOK: Input: default@acid PREHOOK: Input: default@acid@ds=2008-04-08/hr=11 PREHOOK: Output: default@acid@ds=2008-04-08/hr=11 -POSTHOOK: query: update acid set key = 'foo' where value = 'bar' and ds='2008-04-08' and hr=11 +POSTHOOK: query: update acid set value = 'bar' where key = 'foo' and ds='2008-04-08' and hr=11 POSTHOOK: type: QUERY POSTHOOK: Input: default@acid POSTHOOK: Input: default@acid@ds=2008-04-08/hr=11 @@ -621,9 +621,9 @@ POSTHOOK: Input: default@acid POSTHOOK: Input: default@acid@ds=2008-04-08/hr=11 #### A masked pattern was here #### 501 -PREHOOK: query: explain update acid set key = 'foo' where value = 'bar' and ds='2008-04-08' and hr>=11 +PREHOOK: query: explain update acid set value = 'bar' where key = 'foo' and ds='2008-04-08' and hr>=11 PREHOOK: type: QUERY -POSTHOOK: query: explain update acid set key = 'foo' where value = 'bar' and ds='2008-04-08' and hr>=11 +POSTHOOK: query: explain update acid set value = 'bar' where key = 'foo' and ds='2008-04-08' and hr>=11 POSTHOOK: type: QUERY STAGE DEPENDENCIES: Stage-1 is a root stage @@ -637,18 +637,18 @@ STAGE PLANS: TableScan alias: acid Filter Operator - predicate: (value = 'bar') (type: boolean) + predicate: (key = 'foo') (type: boolean) Select Operator - expressions: ROW__ID (type: struct), 'foo' (type: string), hr (type: int) - outputColumnNames: _col0, _col1, _col4 + expressions: ROW__ID (type: struct), 'bar' (type: string), hr (type: int) + outputColumnNames: _col0, _col2, _col4 Reduce Output Operator key expressions: _col0 (type: struct) sort order: + Map-reduce partition columns: UDFToInteger(_col0) (type: int) - value expressions: _col1 (type: string), _col4 (type: int) + value expressions: _col2 (type: string), _col4 (type: int) Reduce Operator Tree: Select Operator - expressions: KEY.reducesinkkey0 (type: struct), VALUE._col0 (type: string), 'bar' (type: string), '2008-04-08' (type: string), VALUE._col3 (type: int) + expressions: KEY.reducesinkkey0 (type: struct), 'foo' (type: string), VALUE._col1 (type: string), '2008-04-08' (type: string), VALUE._col3 (type: int) outputColumnNames: _col0, _col1, _col2, _col3, _col4 File Output Operator compressed: false @@ -674,14 +674,14 @@ STAGE PLANS: Stage: Stage-2 Stats-Aggr Operator -PREHOOK: query: update acid set key = 'foo' where value = 'bar' and ds='2008-04-08' and hr>=11 +PREHOOK: query: update acid set value = 'bar' where key = 'foo' and ds='2008-04-08' and hr>=11 PREHOOK: type: QUERY PREHOOK: Input: default@acid PREHOOK: Input: default@acid@ds=2008-04-08/hr=11 PREHOOK: Input: default@acid@ds=2008-04-08/hr=12 PREHOOK: Output: default@acid@ds=2008-04-08/hr=11 PREHOOK: Output: default@acid@ds=2008-04-08/hr=12 -POSTHOOK: query: update acid set key = 'foo' where value = 'bar' and ds='2008-04-08' and hr>=11 +POSTHOOK: query: update acid set value = 'bar' where key = 'foo' and ds='2008-04-08' and hr>=11 POSTHOOK: type: QUERY POSTHOOK: Input: default@acid POSTHOOK: Input: default@acid@ds=2008-04-08/hr=11 @@ -799,9 +799,9 @@ POSTHOOK: Input: default@acid POSTHOOK: Input: default@acid@ds=2008-04-08/hr=11 #### A masked pattern was here #### 501 -PREHOOK: query: explain update acid set key = 'foo' where value = 'bar' and ds='2008-04-08' and hr=11 +PREHOOK: query: explain update acid set value = 'bar' where key = 'foo' and ds='2008-04-08' and hr=11 PREHOOK: type: QUERY -POSTHOOK: query: explain update acid set key = 'foo' where value = 'bar' and ds='2008-04-08' and hr=11 +POSTHOOK: query: explain update acid set value = 'bar' where key = 'foo' and ds='2008-04-08' and hr=11 POSTHOOK: type: QUERY STAGE DEPENDENCIES: Stage-1 is a root stage @@ -815,18 +815,18 @@ STAGE PLANS: TableScan alias: acid Filter Operator - predicate: (value = 'bar') (type: boolean) + predicate: (key = 'foo') (type: boolean) Select Operator - expressions: ROW__ID (type: struct), 'foo' (type: string) - outputColumnNames: _col0, _col1 + expressions: ROW__ID (type: struct), 'bar' (type: string) + outputColumnNames: _col0, _col2 Reduce Output Operator key expressions: _col0 (type: struct) sort order: + Map-reduce partition columns: UDFToInteger(_col0) (type: int) - value expressions: _col1 (type: string) + value expressions: _col2 (type: string) Reduce Operator Tree: Select Operator - expressions: KEY.reducesinkkey0 (type: struct), VALUE._col0 (type: string), 'bar' (type: string), '2008-04-08' (type: string), 11 (type: int) + expressions: KEY.reducesinkkey0 (type: struct), 'foo' (type: string), VALUE._col1 (type: string), '2008-04-08' (type: string), 11 (type: int) outputColumnNames: _col0, _col1, _col2, _col3, _col4 File Output Operator compressed: false @@ -852,12 +852,12 @@ STAGE PLANS: Stage: Stage-2 Stats-Aggr Operator -PREHOOK: query: update acid set key = 'foo' where value = 'bar' and ds='2008-04-08' and hr=11 +PREHOOK: query: update acid set value = 'bar' where key = 'foo' and ds='2008-04-08' and hr=11 PREHOOK: type: QUERY PREHOOK: Input: default@acid PREHOOK: Input: default@acid@ds=2008-04-08/hr=11 PREHOOK: Output: default@acid@ds=2008-04-08/hr=11 -POSTHOOK: query: update acid set key = 'foo' where value = 'bar' and ds='2008-04-08' and hr=11 +POSTHOOK: query: update acid set value = 'bar' where key = 'foo' and ds='2008-04-08' and hr=11 POSTHOOK: type: QUERY POSTHOOK: Input: default@acid POSTHOOK: Input: default@acid@ds=2008-04-08/hr=11 @@ -873,9 +873,9 @@ POSTHOOK: Input: default@acid POSTHOOK: Input: default@acid@ds=2008-04-08/hr=11 #### A masked pattern was here #### 501 -PREHOOK: query: explain update acid set key = 'foo' where value = 'bar' and ds='2008-04-08' and hr>=11 +PREHOOK: query: explain update acid set value = 'bar' where key = 'foo' and ds='2008-04-08' and hr>=11 PREHOOK: type: QUERY -POSTHOOK: query: explain update acid set key = 'foo' where value = 'bar' and ds='2008-04-08' and hr>=11 +POSTHOOK: query: explain update acid set value = 'bar' where key = 'foo' and ds='2008-04-08' and hr>=11 POSTHOOK: type: QUERY STAGE DEPENDENCIES: Stage-1 is a root stage @@ -889,18 +889,18 @@ STAGE PLANS: TableScan alias: acid Filter Operator - predicate: (value = 'bar') (type: boolean) + predicate: (key = 'foo') (type: boolean) Select Operator - expressions: ROW__ID (type: struct), 'foo' (type: string), hr (type: int) - outputColumnNames: _col0, _col1, _col4 + expressions: ROW__ID (type: struct), 'bar' (type: string), hr (type: int) + outputColumnNames: _col0, _col2, _col4 Reduce Output Operator key expressions: _col0 (type: struct) sort order: + Map-reduce partition columns: UDFToInteger(_col0) (type: int) - value expressions: _col1 (type: string), _col4 (type: int) + value expressions: _col2 (type: string), _col4 (type: int) Reduce Operator Tree: Select Operator - expressions: KEY.reducesinkkey0 (type: struct), VALUE._col0 (type: string), 'bar' (type: string), '2008-04-08' (type: string), VALUE._col3 (type: int) + expressions: KEY.reducesinkkey0 (type: struct), 'foo' (type: string), VALUE._col1 (type: string), '2008-04-08' (type: string), VALUE._col3 (type: int) outputColumnNames: _col0, _col1, _col2, _col3, _col4 File Output Operator compressed: false @@ -926,14 +926,14 @@ STAGE PLANS: Stage: Stage-2 Stats-Aggr Operator -PREHOOK: query: update acid set key = 'foo' where value = 'bar' and ds='2008-04-08' and hr>=11 +PREHOOK: query: update acid set value = 'bar' where key = 'foo' and ds='2008-04-08' and hr>=11 PREHOOK: type: QUERY PREHOOK: Input: default@acid PREHOOK: Input: default@acid@ds=2008-04-08/hr=11 PREHOOK: Input: default@acid@ds=2008-04-08/hr=12 PREHOOK: Output: default@acid@ds=2008-04-08/hr=11 PREHOOK: Output: default@acid@ds=2008-04-08/hr=12 -POSTHOOK: query: update acid set key = 'foo' where value = 'bar' and ds='2008-04-08' and hr>=11 +POSTHOOK: query: update acid set value = 'bar' where key = 'foo' and ds='2008-04-08' and hr>=11 POSTHOOK: type: QUERY POSTHOOK: Input: default@acid POSTHOOK: Input: default@acid@ds=2008-04-08/hr=11 @@ -1051,9 +1051,9 @@ POSTHOOK: Input: default@acid POSTHOOK: Input: default@acid@ds=2008-04-08/hr=11 #### A masked pattern was here #### 501 -PREHOOK: query: explain update acid set key = 'foo' where value = 'bar' and ds='2008-04-08' and hr=11 +PREHOOK: query: explain update acid set value = 'bar' where key = 'foo' and ds='2008-04-08' and hr=11 PREHOOK: type: QUERY -POSTHOOK: query: explain update acid set key = 'foo' where value = 'bar' and ds='2008-04-08' and hr=11 +POSTHOOK: query: explain update acid set value = 'bar' where key = 'foo' and ds='2008-04-08' and hr=11 POSTHOOK: type: QUERY STAGE DEPENDENCIES: Stage-1 is a root stage @@ -1067,9 +1067,9 @@ STAGE PLANS: TableScan alias: acid Filter Operator - predicate: (value = 'bar') (type: boolean) + predicate: (key = 'foo') (type: boolean) Select Operator - expressions: ROW__ID (type: struct), 'foo' (type: string), value (type: string), ds (type: string), hr (type: int) + expressions: ROW__ID (type: struct), key (type: string), 'bar' (type: string), ds (type: string), hr (type: int) outputColumnNames: _col0, _col1, _col2, _col3, _col4 Reduce Output Operator key expressions: _col0 (type: struct) @@ -1104,12 +1104,12 @@ STAGE PLANS: Stage: Stage-2 Stats-Aggr Operator -PREHOOK: query: update acid set key = 'foo' where value = 'bar' and ds='2008-04-08' and hr=11 +PREHOOK: query: update acid set value = 'bar' where key = 'foo' and ds='2008-04-08' and hr=11 PREHOOK: type: QUERY PREHOOK: Input: default@acid PREHOOK: Input: default@acid@ds=2008-04-08/hr=11 PREHOOK: Output: default@acid@ds=2008-04-08/hr=11 -POSTHOOK: query: update acid set key = 'foo' where value = 'bar' and ds='2008-04-08' and hr=11 +POSTHOOK: query: update acid set value = 'bar' where key = 'foo' and ds='2008-04-08' and hr=11 POSTHOOK: type: QUERY POSTHOOK: Input: default@acid POSTHOOK: Input: default@acid@ds=2008-04-08/hr=11 @@ -1125,9 +1125,9 @@ POSTHOOK: Input: default@acid POSTHOOK: Input: default@acid@ds=2008-04-08/hr=11 #### A masked pattern was here #### 501 -PREHOOK: query: explain update acid set key = 'foo' where value = 'bar' and ds='2008-04-08' and hr>=11 +PREHOOK: query: explain update acid set value = 'bar' where key = 'foo' and ds='2008-04-08' and hr>=11 PREHOOK: type: QUERY -POSTHOOK: query: explain update acid set key = 'foo' where value = 'bar' and ds='2008-04-08' and hr>=11 +POSTHOOK: query: explain update acid set value = 'bar' where key = 'foo' and ds='2008-04-08' and hr>=11 POSTHOOK: type: QUERY STAGE DEPENDENCIES: Stage-1 is a root stage @@ -1141,9 +1141,9 @@ STAGE PLANS: TableScan alias: acid Filter Operator - predicate: (value = 'bar') (type: boolean) + predicate: (key = 'foo') (type: boolean) Select Operator - expressions: ROW__ID (type: struct), 'foo' (type: string), value (type: string), ds (type: string), hr (type: int) + expressions: ROW__ID (type: struct), key (type: string), 'bar' (type: string), ds (type: string), hr (type: int) outputColumnNames: _col0, _col1, _col2, _col3, _col4 Reduce Output Operator key expressions: _col0 (type: struct) @@ -1178,14 +1178,14 @@ STAGE PLANS: Stage: Stage-2 Stats-Aggr Operator -PREHOOK: query: update acid set key = 'foo' where value = 'bar' and ds='2008-04-08' and hr>=11 +PREHOOK: query: update acid set value = 'bar' where key = 'foo' and ds='2008-04-08' and hr>=11 PREHOOK: type: QUERY PREHOOK: Input: default@acid PREHOOK: Input: default@acid@ds=2008-04-08/hr=11 PREHOOK: Input: default@acid@ds=2008-04-08/hr=12 PREHOOK: Output: default@acid@ds=2008-04-08/hr=11 PREHOOK: Output: default@acid@ds=2008-04-08/hr=12 -POSTHOOK: query: update acid set key = 'foo' where value = 'bar' and ds='2008-04-08' and hr>=11 +POSTHOOK: query: update acid set value = 'bar' where key = 'foo' and ds='2008-04-08' and hr>=11 POSTHOOK: type: QUERY POSTHOOK: Input: default@acid POSTHOOK: Input: default@acid@ds=2008-04-08/hr=11 diff --git ql/src/test/results/clientpositive/tez/update_all_types.q.out ql/src/test/results/clientpositive/tez/update_all_types.q.out index eba4dde..3a111ae 100644 --- ql/src/test/results/clientpositive/tez/update_all_types.q.out +++ ql/src/test/results/clientpositive/tez/update_all_types.q.out @@ -1,6 +1,7 @@ PREHOOK: query: create table acid_uat(ti tinyint, si smallint, i int, + j int, bi bigint, f float, d double, @@ -17,6 +18,7 @@ PREHOOK: Output: default@acid_uat POSTHOOK: query: create table acid_uat(ti tinyint, si smallint, i int, + j int, bi bigint, f float, d double, @@ -34,6 +36,7 @@ PREHOOK: query: insert into table acid_uat select ctinyint, csmallint, cint, + cint j, cbigint, cfloat, cdouble, @@ -52,6 +55,7 @@ POSTHOOK: query: insert into table acid_uat select ctinyint, csmallint, cint, + cint j, cbigint, cfloat, cdouble, @@ -74,6 +78,7 @@ POSTHOOK: Lineage: acid_uat.de EXPRESSION [(alltypesorc)alltypesorc.FieldSchema( POSTHOOK: Lineage: acid_uat.dt EXPRESSION [(alltypesorc)alltypesorc.FieldSchema(name:ctimestamp2, type:timestamp, comment:null), ] POSTHOOK: Lineage: acid_uat.f SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:cfloat, type:float, comment:null), ] POSTHOOK: Lineage: acid_uat.i SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:cint, type:int, comment:null), ] +POSTHOOK: Lineage: acid_uat.j SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:cint, type:int, comment:null), ] POSTHOOK: Lineage: acid_uat.s SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:cstring1, type:string, comment:null), ] POSTHOOK: Lineage: acid_uat.si SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:csmallint, type:smallint, comment:null), ] POSTHOOK: Lineage: acid_uat.t SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:ctimestamp1, type:timestamp, comment:null), ] @@ -87,20 +92,20 @@ POSTHOOK: query: select * from acid_uat order by i POSTHOOK: type: QUERY POSTHOOK: Input: default@acid_uat #### A masked pattern was here #### -11 NULL -1073279343 -1595604468 11.0 NULL 11 1969-12-31 16:00:02.351 NULL oj1YrV5Wa oj1YrV5Wa P76636jJ6qM17d7DIy true -NULL -7382 -1073051226 -1887561756 NULL -7382.0 NULL NULL 1970-01-01 A34p7oRr2WvUJNf A34p7oRr2WvUJNf 4hA4KQj2vD3fI6gX82220d false -11 NULL -1072910839 2048385991 11.0 NULL 11 1969-12-31 16:00:02.351 NULL 0iqrc5 0iqrc5 KbaDXiN85adbHRx58v false -NULL 8373 -1072081801 1864027286 NULL 8373.0 NULL NULL 1970-01-01 dPkN74F7 dPkN74F7 4KWs6gw7lv2WYd66P true -NULL -5470 -1072076362 1864027286 NULL -5470.0 NULL NULL 1970-01-01 2uLyD28144vklju213J1mr 2uLyD28144vklju213J1mr 4KWs6gw7lv2WYd66P true --51 NULL -1071480828 -1401575336 -51.0 NULL -51 1969-12-31 16:00:08.451 NULL aw724t8c5558x2xneC624 aw724t8c5558x2xneC624 4uE7l74tESBiKfu7c8wM7GA true -8 NULL -1071363017 1349676361 8.0 NULL 8 1969-12-31 16:00:15.892 NULL Anj0oF Anj0oF IwE1G7Qb0B1NEfV030g true -NULL -741 -1070883071 -1645852809 NULL -741.0 NULL NULL 1970-01-01 0ruyd6Y50JpdGRf6HqD 0ruyd6Y50JpdGRf6HqD xH7445Rals48VOulSyR5F false -NULL -947 -1070551679 1864027286 NULL -947.0 NULL NULL 1970-01-01 iUR3Q iUR3Q 4KWs6gw7lv2WYd66P false -11 NULL -1069736047 -453772520 11.0 NULL 11 1969-12-31 16:00:02.351 NULL k17Am8uPHWk02cEf1jet k17Am8uPHWk02cEf1jet qrXLLNX1 true +11 NULL -1073279343 -1073279343 -1595604468 11.0 NULL 11 1969-12-31 16:00:02.351 NULL oj1YrV5Wa oj1YrV5Wa P76636jJ6qM17d7DIy true +NULL -7382 -1073051226 -1073051226 -1887561756 NULL -7382.0 NULL NULL 1970-01-01 A34p7oRr2WvUJNf A34p7oRr2WvUJNf 4hA4KQj2vD3fI6gX82220d false +11 NULL -1072910839 -1072910839 2048385991 11.0 NULL 11 1969-12-31 16:00:02.351 NULL 0iqrc5 0iqrc5 KbaDXiN85adbHRx58v false +NULL 8373 -1072081801 -1072081801 1864027286 NULL 8373.0 NULL NULL 1970-01-01 dPkN74F7 dPkN74F7 4KWs6gw7lv2WYd66P true +NULL -5470 -1072076362 -1072076362 1864027286 NULL -5470.0 NULL NULL 1970-01-01 2uLyD28144vklju213J1mr 2uLyD28144vklju213J1mr 4KWs6gw7lv2WYd66P true +-51 NULL -1071480828 -1071480828 -1401575336 -51.0 NULL -51 1969-12-31 16:00:08.451 NULL aw724t8c5558x2xneC624 aw724t8c5558x2xneC624 4uE7l74tESBiKfu7c8wM7GA true +8 NULL -1071363017 -1071363017 1349676361 8.0 NULL 8 1969-12-31 16:00:15.892 NULL Anj0oF Anj0oF IwE1G7Qb0B1NEfV030g true +NULL -741 -1070883071 -1070883071 -1645852809 NULL -741.0 NULL NULL 1970-01-01 0ruyd6Y50JpdGRf6HqD 0ruyd6Y50JpdGRf6HqD xH7445Rals48VOulSyR5F false +NULL -947 -1070551679 -1070551679 1864027286 NULL -947.0 NULL NULL 1970-01-01 iUR3Q iUR3Q 4KWs6gw7lv2WYd66P false +11 NULL -1069736047 -1069736047 -453772520 11.0 NULL 11 1969-12-31 16:00:02.351 NULL k17Am8uPHWk02cEf1jet k17Am8uPHWk02cEf1jet qrXLLNX1 true PREHOOK: query: update acid_uat set ti = 1, si = 2, - i = 3, + j = 3, bi = 4, f = 3.14, d = 6.28, @@ -118,7 +123,7 @@ PREHOOK: Output: default@acid_uat POSTHOOK: query: update acid_uat set ti = 1, si = 2, - i = 3, + j = 3, bi = 4, f = 3.14, d = 6.28, @@ -141,16 +146,16 @@ POSTHOOK: query: select * from acid_uat order by i POSTHOOK: type: QUERY POSTHOOK: Input: default@acid_uat #### A masked pattern was here #### -11 NULL -1073279343 -1595604468 11.0 NULL 11 1969-12-31 16:00:02.351 NULL oj1YrV5Wa oj1YrV5Wa P76636jJ6qM17d7DIy true -NULL -7382 -1073051226 -1887561756 NULL -7382.0 NULL NULL 1970-01-01 A34p7oRr2WvUJNf A34p7oRr2WvUJNf 4hA4KQj2vD3fI6gX82220d false -11 NULL -1072910839 2048385991 11.0 NULL 11 1969-12-31 16:00:02.351 NULL 0iqrc5 0iqrc5 KbaDXiN85adbHRx58v false -NULL 8373 -1072081801 1864027286 NULL 8373.0 NULL NULL 1970-01-01 dPkN74F7 dPkN74F7 4KWs6gw7lv2WYd66P true -NULL -5470 -1072076362 1864027286 NULL -5470.0 NULL NULL 1970-01-01 2uLyD28144vklju213J1mr 2uLyD28144vklju213J1mr 4KWs6gw7lv2WYd66P true --51 NULL -1071480828 -1401575336 -51.0 NULL -51 1969-12-31 16:00:08.451 NULL aw724t8c5558x2xneC624 aw724t8c5558x2xneC624 4uE7l74tESBiKfu7c8wM7GA true -8 NULL -1071363017 1349676361 8.0 NULL 8 1969-12-31 16:00:15.892 NULL Anj0oF Anj0oF IwE1G7Qb0B1NEfV030g true -NULL -947 -1070551679 1864027286 NULL -947.0 NULL NULL 1970-01-01 iUR3Q iUR3Q 4KWs6gw7lv2WYd66P false -11 NULL -1069736047 -453772520 11.0 NULL 11 1969-12-31 16:00:02.351 NULL k17Am8uPHWk02cEf1jet k17Am8uPHWk02cEf1jet qrXLLNX1 true -1 2 3 4 3.14 6.28 5.99 NULL 2014-09-01 its a beautiful day in the neighbhorhood a beautiful day for a neighbor wont you be mine true +11 NULL -1073279343 -1073279343 -1595604468 11.0 NULL 11 1969-12-31 16:00:02.351 NULL oj1YrV5Wa oj1YrV5Wa P76636jJ6qM17d7DIy true +NULL -7382 -1073051226 -1073051226 -1887561756 NULL -7382.0 NULL NULL 1970-01-01 A34p7oRr2WvUJNf A34p7oRr2WvUJNf 4hA4KQj2vD3fI6gX82220d false +11 NULL -1072910839 -1072910839 2048385991 11.0 NULL 11 1969-12-31 16:00:02.351 NULL 0iqrc5 0iqrc5 KbaDXiN85adbHRx58v false +NULL 8373 -1072081801 -1072081801 1864027286 NULL 8373.0 NULL NULL 1970-01-01 dPkN74F7 dPkN74F7 4KWs6gw7lv2WYd66P true +NULL -5470 -1072076362 -1072076362 1864027286 NULL -5470.0 NULL NULL 1970-01-01 2uLyD28144vklju213J1mr 2uLyD28144vklju213J1mr 4KWs6gw7lv2WYd66P true +-51 NULL -1071480828 -1071480828 -1401575336 -51.0 NULL -51 1969-12-31 16:00:08.451 NULL aw724t8c5558x2xneC624 aw724t8c5558x2xneC624 4uE7l74tESBiKfu7c8wM7GA true +8 NULL -1071363017 -1071363017 1349676361 8.0 NULL 8 1969-12-31 16:00:15.892 NULL Anj0oF Anj0oF IwE1G7Qb0B1NEfV030g true +1 2 -1070883071 3 4 3.14 6.28 5.99 NULL 2014-09-01 its a beautiful day in the neighbhorhood a beautiful day for a neighbor wont you be mine true +NULL -947 -1070551679 -1070551679 1864027286 NULL -947.0 NULL NULL 1970-01-01 iUR3Q iUR3Q 4KWs6gw7lv2WYd66P false +11 NULL -1069736047 -1069736047 -453772520 11.0 NULL 11 1969-12-31 16:00:02.351 NULL k17Am8uPHWk02cEf1jet k17Am8uPHWk02cEf1jet qrXLLNX1 true PREHOOK: query: update acid_uat set ti = ti * 2, si = cast(f as int), @@ -175,13 +180,13 @@ POSTHOOK: query: select * from acid_uat order by i POSTHOOK: type: QUERY POSTHOOK: Input: default@acid_uat #### A masked pattern was here #### -11 NULL -1073279343 -1595604468 11.0 NULL 11 1969-12-31 16:00:02.351 NULL oj1YrV5Wa oj1YrV5Wa P76636jJ6qM17d7DIy true -NULL -7382 -1073051226 -1887561756 NULL -7382.0 NULL NULL 1970-01-01 A34p7oRr2WvUJNf A34p7oRr2WvUJNf 4hA4KQj2vD3fI6gX82220d false -11 NULL -1072910839 2048385991 11.0 NULL 11 1969-12-31 16:00:02.351 NULL 0iqrc5 0iqrc5 KbaDXiN85adbHRx58v false -NULL 8373 -1072081801 1864027286 NULL 8373.0 NULL NULL 1970-01-01 dPkN74F7 dPkN74F7 4KWs6gw7lv2WYd66P true -NULL -5470 -1072076362 1864027286 NULL -5470.0 NULL NULL 1970-01-01 2uLyD28144vklju213J1mr 2uLyD28144vklju213J1mr 4KWs6gw7lv2WYd66P true --102 -51 -1071480828 -1401575336 -51.0 -51.0 -51 1969-12-31 16:00:08.451 NULL aw724t8c5558x2xneC624 aw724t8c5558x2xneC624 4uE7l74tESBiKfu7c8wM7GA true -8 NULL -1071363017 1349676361 8.0 NULL 8 1969-12-31 16:00:15.892 NULL Anj0oF Anj0oF IwE1G7Qb0B1NEfV030g true -NULL -947 -1070551679 1864027286 NULL -947.0 NULL NULL 1970-01-01 iUR3Q iUR3Q 4KWs6gw7lv2WYd66P false -11 NULL -1069736047 -453772520 11.0 NULL 11 1969-12-31 16:00:02.351 NULL k17Am8uPHWk02cEf1jet k17Am8uPHWk02cEf1jet qrXLLNX1 true -1 2 3 4 3.14 6.28 5.99 NULL 2014-09-01 its a beautiful day in the neighbhorhood a beautiful day for a neighbor wont you be mine true +11 NULL -1073279343 -1073279343 -1595604468 11.0 NULL 11 1969-12-31 16:00:02.351 NULL oj1YrV5Wa oj1YrV5Wa P76636jJ6qM17d7DIy true +NULL -7382 -1073051226 -1073051226 -1887561756 NULL -7382.0 NULL NULL 1970-01-01 A34p7oRr2WvUJNf A34p7oRr2WvUJNf 4hA4KQj2vD3fI6gX82220d false +11 NULL -1072910839 -1072910839 2048385991 11.0 NULL 11 1969-12-31 16:00:02.351 NULL 0iqrc5 0iqrc5 KbaDXiN85adbHRx58v false +NULL 8373 -1072081801 -1072081801 1864027286 NULL 8373.0 NULL NULL 1970-01-01 dPkN74F7 dPkN74F7 4KWs6gw7lv2WYd66P true +NULL -5470 -1072076362 -1072076362 1864027286 NULL -5470.0 NULL NULL 1970-01-01 2uLyD28144vklju213J1mr 2uLyD28144vklju213J1mr 4KWs6gw7lv2WYd66P true +-102 -51 -1071480828 -1071480828 -1401575336 -51.0 -51.0 -51 1969-12-31 16:00:08.451 NULL aw724t8c5558x2xneC624 aw724t8c5558x2xneC624 4uE7l74tESBiKfu7c8wM7GA true +8 NULL -1071363017 -1071363017 1349676361 8.0 NULL 8 1969-12-31 16:00:15.892 NULL Anj0oF Anj0oF IwE1G7Qb0B1NEfV030g true +1 2 -1070883071 3 4 3.14 6.28 5.99 NULL 2014-09-01 its a beautiful day in the neighbhorhood a beautiful day for a neighbor wont you be mine true +NULL -947 -1070551679 -1070551679 1864027286 NULL -947.0 NULL NULL 1970-01-01 iUR3Q iUR3Q 4KWs6gw7lv2WYd66P false +11 NULL -1069736047 -1069736047 -453772520 11.0 NULL 11 1969-12-31 16:00:02.351 NULL k17Am8uPHWk02cEf1jet k17Am8uPHWk02cEf1jet qrXLLNX1 true diff --git ql/src/test/results/clientpositive/tez/update_tmp_table.q.out ql/src/test/results/clientpositive/tez/update_tmp_table.q.out index 3c86a0c..446a379 100644 --- ql/src/test/results/clientpositive/tez/update_tmp_table.q.out +++ ql/src/test/results/clientpositive/tez/update_tmp_table.q.out @@ -34,11 +34,11 @@ POSTHOOK: Input: default@acid_utt -1070883071 0ruyd6Y50JpdGRf6HqD -1070551679 iUR3Q -1069736047 k17Am8uPHWk02cEf1jet -PREHOOK: query: update acid_utt set b = 'fred' where b = '0ruyd6Y50JpdGRf6HqD' +PREHOOK: query: update acid_utt set a = 'fred' where b = '0ruyd6Y50JpdGRf6HqD' PREHOOK: type: QUERY PREHOOK: Input: default@acid_utt PREHOOK: Output: default@acid_utt -POSTHOOK: query: update acid_utt set b = 'fred' where b = '0ruyd6Y50JpdGRf6HqD' +POSTHOOK: query: update acid_utt set a = 'fred' where b = '0ruyd6Y50JpdGRf6HqD' POSTHOOK: type: QUERY POSTHOOK: Input: default@acid_utt POSTHOOK: Output: default@acid_utt @@ -50,6 +50,7 @@ POSTHOOK: query: select * from acid_utt order by a POSTHOOK: type: QUERY POSTHOOK: Input: default@acid_utt #### A masked pattern was here #### +NULL 0ruyd6Y50JpdGRf6HqD -1073279343 oj1YrV5Wa -1073051226 A34p7oRr2WvUJNf -1072910839 0iqrc5 @@ -57,6 +58,5 @@ POSTHOOK: Input: default@acid_utt -1072076362 2uLyD28144vklju213J1mr -1071480828 aw724t8c5558x2xneC624 -1071363017 Anj0oF --1070883071 fred -1070551679 iUR3Q -1069736047 k17Am8uPHWk02cEf1jet diff --git ql/src/test/results/clientpositive/update_all_types.q.out ql/src/test/results/clientpositive/update_all_types.q.out index eba4dde..3a111ae 100644 --- ql/src/test/results/clientpositive/update_all_types.q.out +++ ql/src/test/results/clientpositive/update_all_types.q.out @@ -1,6 +1,7 @@ PREHOOK: query: create table acid_uat(ti tinyint, si smallint, i int, + j int, bi bigint, f float, d double, @@ -17,6 +18,7 @@ PREHOOK: Output: default@acid_uat POSTHOOK: query: create table acid_uat(ti tinyint, si smallint, i int, + j int, bi bigint, f float, d double, @@ -34,6 +36,7 @@ PREHOOK: query: insert into table acid_uat select ctinyint, csmallint, cint, + cint j, cbigint, cfloat, cdouble, @@ -52,6 +55,7 @@ POSTHOOK: query: insert into table acid_uat select ctinyint, csmallint, cint, + cint j, cbigint, cfloat, cdouble, @@ -74,6 +78,7 @@ POSTHOOK: Lineage: acid_uat.de EXPRESSION [(alltypesorc)alltypesorc.FieldSchema( POSTHOOK: Lineage: acid_uat.dt EXPRESSION [(alltypesorc)alltypesorc.FieldSchema(name:ctimestamp2, type:timestamp, comment:null), ] POSTHOOK: Lineage: acid_uat.f SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:cfloat, type:float, comment:null), ] POSTHOOK: Lineage: acid_uat.i SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:cint, type:int, comment:null), ] +POSTHOOK: Lineage: acid_uat.j SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:cint, type:int, comment:null), ] POSTHOOK: Lineage: acid_uat.s SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:cstring1, type:string, comment:null), ] POSTHOOK: Lineage: acid_uat.si SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:csmallint, type:smallint, comment:null), ] POSTHOOK: Lineage: acid_uat.t SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:ctimestamp1, type:timestamp, comment:null), ] @@ -87,20 +92,20 @@ POSTHOOK: query: select * from acid_uat order by i POSTHOOK: type: QUERY POSTHOOK: Input: default@acid_uat #### A masked pattern was here #### -11 NULL -1073279343 -1595604468 11.0 NULL 11 1969-12-31 16:00:02.351 NULL oj1YrV5Wa oj1YrV5Wa P76636jJ6qM17d7DIy true -NULL -7382 -1073051226 -1887561756 NULL -7382.0 NULL NULL 1970-01-01 A34p7oRr2WvUJNf A34p7oRr2WvUJNf 4hA4KQj2vD3fI6gX82220d false -11 NULL -1072910839 2048385991 11.0 NULL 11 1969-12-31 16:00:02.351 NULL 0iqrc5 0iqrc5 KbaDXiN85adbHRx58v false -NULL 8373 -1072081801 1864027286 NULL 8373.0 NULL NULL 1970-01-01 dPkN74F7 dPkN74F7 4KWs6gw7lv2WYd66P true -NULL -5470 -1072076362 1864027286 NULL -5470.0 NULL NULL 1970-01-01 2uLyD28144vklju213J1mr 2uLyD28144vklju213J1mr 4KWs6gw7lv2WYd66P true --51 NULL -1071480828 -1401575336 -51.0 NULL -51 1969-12-31 16:00:08.451 NULL aw724t8c5558x2xneC624 aw724t8c5558x2xneC624 4uE7l74tESBiKfu7c8wM7GA true -8 NULL -1071363017 1349676361 8.0 NULL 8 1969-12-31 16:00:15.892 NULL Anj0oF Anj0oF IwE1G7Qb0B1NEfV030g true -NULL -741 -1070883071 -1645852809 NULL -741.0 NULL NULL 1970-01-01 0ruyd6Y50JpdGRf6HqD 0ruyd6Y50JpdGRf6HqD xH7445Rals48VOulSyR5F false -NULL -947 -1070551679 1864027286 NULL -947.0 NULL NULL 1970-01-01 iUR3Q iUR3Q 4KWs6gw7lv2WYd66P false -11 NULL -1069736047 -453772520 11.0 NULL 11 1969-12-31 16:00:02.351 NULL k17Am8uPHWk02cEf1jet k17Am8uPHWk02cEf1jet qrXLLNX1 true +11 NULL -1073279343 -1073279343 -1595604468 11.0 NULL 11 1969-12-31 16:00:02.351 NULL oj1YrV5Wa oj1YrV5Wa P76636jJ6qM17d7DIy true +NULL -7382 -1073051226 -1073051226 -1887561756 NULL -7382.0 NULL NULL 1970-01-01 A34p7oRr2WvUJNf A34p7oRr2WvUJNf 4hA4KQj2vD3fI6gX82220d false +11 NULL -1072910839 -1072910839 2048385991 11.0 NULL 11 1969-12-31 16:00:02.351 NULL 0iqrc5 0iqrc5 KbaDXiN85adbHRx58v false +NULL 8373 -1072081801 -1072081801 1864027286 NULL 8373.0 NULL NULL 1970-01-01 dPkN74F7 dPkN74F7 4KWs6gw7lv2WYd66P true +NULL -5470 -1072076362 -1072076362 1864027286 NULL -5470.0 NULL NULL 1970-01-01 2uLyD28144vklju213J1mr 2uLyD28144vklju213J1mr 4KWs6gw7lv2WYd66P true +-51 NULL -1071480828 -1071480828 -1401575336 -51.0 NULL -51 1969-12-31 16:00:08.451 NULL aw724t8c5558x2xneC624 aw724t8c5558x2xneC624 4uE7l74tESBiKfu7c8wM7GA true +8 NULL -1071363017 -1071363017 1349676361 8.0 NULL 8 1969-12-31 16:00:15.892 NULL Anj0oF Anj0oF IwE1G7Qb0B1NEfV030g true +NULL -741 -1070883071 -1070883071 -1645852809 NULL -741.0 NULL NULL 1970-01-01 0ruyd6Y50JpdGRf6HqD 0ruyd6Y50JpdGRf6HqD xH7445Rals48VOulSyR5F false +NULL -947 -1070551679 -1070551679 1864027286 NULL -947.0 NULL NULL 1970-01-01 iUR3Q iUR3Q 4KWs6gw7lv2WYd66P false +11 NULL -1069736047 -1069736047 -453772520 11.0 NULL 11 1969-12-31 16:00:02.351 NULL k17Am8uPHWk02cEf1jet k17Am8uPHWk02cEf1jet qrXLLNX1 true PREHOOK: query: update acid_uat set ti = 1, si = 2, - i = 3, + j = 3, bi = 4, f = 3.14, d = 6.28, @@ -118,7 +123,7 @@ PREHOOK: Output: default@acid_uat POSTHOOK: query: update acid_uat set ti = 1, si = 2, - i = 3, + j = 3, bi = 4, f = 3.14, d = 6.28, @@ -141,16 +146,16 @@ POSTHOOK: query: select * from acid_uat order by i POSTHOOK: type: QUERY POSTHOOK: Input: default@acid_uat #### A masked pattern was here #### -11 NULL -1073279343 -1595604468 11.0 NULL 11 1969-12-31 16:00:02.351 NULL oj1YrV5Wa oj1YrV5Wa P76636jJ6qM17d7DIy true -NULL -7382 -1073051226 -1887561756 NULL -7382.0 NULL NULL 1970-01-01 A34p7oRr2WvUJNf A34p7oRr2WvUJNf 4hA4KQj2vD3fI6gX82220d false -11 NULL -1072910839 2048385991 11.0 NULL 11 1969-12-31 16:00:02.351 NULL 0iqrc5 0iqrc5 KbaDXiN85adbHRx58v false -NULL 8373 -1072081801 1864027286 NULL 8373.0 NULL NULL 1970-01-01 dPkN74F7 dPkN74F7 4KWs6gw7lv2WYd66P true -NULL -5470 -1072076362 1864027286 NULL -5470.0 NULL NULL 1970-01-01 2uLyD28144vklju213J1mr 2uLyD28144vklju213J1mr 4KWs6gw7lv2WYd66P true --51 NULL -1071480828 -1401575336 -51.0 NULL -51 1969-12-31 16:00:08.451 NULL aw724t8c5558x2xneC624 aw724t8c5558x2xneC624 4uE7l74tESBiKfu7c8wM7GA true -8 NULL -1071363017 1349676361 8.0 NULL 8 1969-12-31 16:00:15.892 NULL Anj0oF Anj0oF IwE1G7Qb0B1NEfV030g true -NULL -947 -1070551679 1864027286 NULL -947.0 NULL NULL 1970-01-01 iUR3Q iUR3Q 4KWs6gw7lv2WYd66P false -11 NULL -1069736047 -453772520 11.0 NULL 11 1969-12-31 16:00:02.351 NULL k17Am8uPHWk02cEf1jet k17Am8uPHWk02cEf1jet qrXLLNX1 true -1 2 3 4 3.14 6.28 5.99 NULL 2014-09-01 its a beautiful day in the neighbhorhood a beautiful day for a neighbor wont you be mine true +11 NULL -1073279343 -1073279343 -1595604468 11.0 NULL 11 1969-12-31 16:00:02.351 NULL oj1YrV5Wa oj1YrV5Wa P76636jJ6qM17d7DIy true +NULL -7382 -1073051226 -1073051226 -1887561756 NULL -7382.0 NULL NULL 1970-01-01 A34p7oRr2WvUJNf A34p7oRr2WvUJNf 4hA4KQj2vD3fI6gX82220d false +11 NULL -1072910839 -1072910839 2048385991 11.0 NULL 11 1969-12-31 16:00:02.351 NULL 0iqrc5 0iqrc5 KbaDXiN85adbHRx58v false +NULL 8373 -1072081801 -1072081801 1864027286 NULL 8373.0 NULL NULL 1970-01-01 dPkN74F7 dPkN74F7 4KWs6gw7lv2WYd66P true +NULL -5470 -1072076362 -1072076362 1864027286 NULL -5470.0 NULL NULL 1970-01-01 2uLyD28144vklju213J1mr 2uLyD28144vklju213J1mr 4KWs6gw7lv2WYd66P true +-51 NULL -1071480828 -1071480828 -1401575336 -51.0 NULL -51 1969-12-31 16:00:08.451 NULL aw724t8c5558x2xneC624 aw724t8c5558x2xneC624 4uE7l74tESBiKfu7c8wM7GA true +8 NULL -1071363017 -1071363017 1349676361 8.0 NULL 8 1969-12-31 16:00:15.892 NULL Anj0oF Anj0oF IwE1G7Qb0B1NEfV030g true +1 2 -1070883071 3 4 3.14 6.28 5.99 NULL 2014-09-01 its a beautiful day in the neighbhorhood a beautiful day for a neighbor wont you be mine true +NULL -947 -1070551679 -1070551679 1864027286 NULL -947.0 NULL NULL 1970-01-01 iUR3Q iUR3Q 4KWs6gw7lv2WYd66P false +11 NULL -1069736047 -1069736047 -453772520 11.0 NULL 11 1969-12-31 16:00:02.351 NULL k17Am8uPHWk02cEf1jet k17Am8uPHWk02cEf1jet qrXLLNX1 true PREHOOK: query: update acid_uat set ti = ti * 2, si = cast(f as int), @@ -175,13 +180,13 @@ POSTHOOK: query: select * from acid_uat order by i POSTHOOK: type: QUERY POSTHOOK: Input: default@acid_uat #### A masked pattern was here #### -11 NULL -1073279343 -1595604468 11.0 NULL 11 1969-12-31 16:00:02.351 NULL oj1YrV5Wa oj1YrV5Wa P76636jJ6qM17d7DIy true -NULL -7382 -1073051226 -1887561756 NULL -7382.0 NULL NULL 1970-01-01 A34p7oRr2WvUJNf A34p7oRr2WvUJNf 4hA4KQj2vD3fI6gX82220d false -11 NULL -1072910839 2048385991 11.0 NULL 11 1969-12-31 16:00:02.351 NULL 0iqrc5 0iqrc5 KbaDXiN85adbHRx58v false -NULL 8373 -1072081801 1864027286 NULL 8373.0 NULL NULL 1970-01-01 dPkN74F7 dPkN74F7 4KWs6gw7lv2WYd66P true -NULL -5470 -1072076362 1864027286 NULL -5470.0 NULL NULL 1970-01-01 2uLyD28144vklju213J1mr 2uLyD28144vklju213J1mr 4KWs6gw7lv2WYd66P true --102 -51 -1071480828 -1401575336 -51.0 -51.0 -51 1969-12-31 16:00:08.451 NULL aw724t8c5558x2xneC624 aw724t8c5558x2xneC624 4uE7l74tESBiKfu7c8wM7GA true -8 NULL -1071363017 1349676361 8.0 NULL 8 1969-12-31 16:00:15.892 NULL Anj0oF Anj0oF IwE1G7Qb0B1NEfV030g true -NULL -947 -1070551679 1864027286 NULL -947.0 NULL NULL 1970-01-01 iUR3Q iUR3Q 4KWs6gw7lv2WYd66P false -11 NULL -1069736047 -453772520 11.0 NULL 11 1969-12-31 16:00:02.351 NULL k17Am8uPHWk02cEf1jet k17Am8uPHWk02cEf1jet qrXLLNX1 true -1 2 3 4 3.14 6.28 5.99 NULL 2014-09-01 its a beautiful day in the neighbhorhood a beautiful day for a neighbor wont you be mine true +11 NULL -1073279343 -1073279343 -1595604468 11.0 NULL 11 1969-12-31 16:00:02.351 NULL oj1YrV5Wa oj1YrV5Wa P76636jJ6qM17d7DIy true +NULL -7382 -1073051226 -1073051226 -1887561756 NULL -7382.0 NULL NULL 1970-01-01 A34p7oRr2WvUJNf A34p7oRr2WvUJNf 4hA4KQj2vD3fI6gX82220d false +11 NULL -1072910839 -1072910839 2048385991 11.0 NULL 11 1969-12-31 16:00:02.351 NULL 0iqrc5 0iqrc5 KbaDXiN85adbHRx58v false +NULL 8373 -1072081801 -1072081801 1864027286 NULL 8373.0 NULL NULL 1970-01-01 dPkN74F7 dPkN74F7 4KWs6gw7lv2WYd66P true +NULL -5470 -1072076362 -1072076362 1864027286 NULL -5470.0 NULL NULL 1970-01-01 2uLyD28144vklju213J1mr 2uLyD28144vklju213J1mr 4KWs6gw7lv2WYd66P true +-102 -51 -1071480828 -1071480828 -1401575336 -51.0 -51.0 -51 1969-12-31 16:00:08.451 NULL aw724t8c5558x2xneC624 aw724t8c5558x2xneC624 4uE7l74tESBiKfu7c8wM7GA true +8 NULL -1071363017 -1071363017 1349676361 8.0 NULL 8 1969-12-31 16:00:15.892 NULL Anj0oF Anj0oF IwE1G7Qb0B1NEfV030g true +1 2 -1070883071 3 4 3.14 6.28 5.99 NULL 2014-09-01 its a beautiful day in the neighbhorhood a beautiful day for a neighbor wont you be mine true +NULL -947 -1070551679 -1070551679 1864027286 NULL -947.0 NULL NULL 1970-01-01 iUR3Q iUR3Q 4KWs6gw7lv2WYd66P false +11 NULL -1069736047 -1069736047 -453772520 11.0 NULL 11 1969-12-31 16:00:02.351 NULL k17Am8uPHWk02cEf1jet k17Am8uPHWk02cEf1jet qrXLLNX1 true diff --git ql/src/test/results/clientpositive/update_tmp_table.q.out ql/src/test/results/clientpositive/update_tmp_table.q.out index 3c86a0c..446a379 100644 --- ql/src/test/results/clientpositive/update_tmp_table.q.out +++ ql/src/test/results/clientpositive/update_tmp_table.q.out @@ -34,11 +34,11 @@ POSTHOOK: Input: default@acid_utt -1070883071 0ruyd6Y50JpdGRf6HqD -1070551679 iUR3Q -1069736047 k17Am8uPHWk02cEf1jet -PREHOOK: query: update acid_utt set b = 'fred' where b = '0ruyd6Y50JpdGRf6HqD' +PREHOOK: query: update acid_utt set a = 'fred' where b = '0ruyd6Y50JpdGRf6HqD' PREHOOK: type: QUERY PREHOOK: Input: default@acid_utt PREHOOK: Output: default@acid_utt -POSTHOOK: query: update acid_utt set b = 'fred' where b = '0ruyd6Y50JpdGRf6HqD' +POSTHOOK: query: update acid_utt set a = 'fred' where b = '0ruyd6Y50JpdGRf6HqD' POSTHOOK: type: QUERY POSTHOOK: Input: default@acid_utt POSTHOOK: Output: default@acid_utt @@ -50,6 +50,7 @@ POSTHOOK: query: select * from acid_utt order by a POSTHOOK: type: QUERY POSTHOOK: Input: default@acid_utt #### A masked pattern was here #### +NULL 0ruyd6Y50JpdGRf6HqD -1073279343 oj1YrV5Wa -1073051226 A34p7oRr2WvUJNf -1072910839 0iqrc5 @@ -57,6 +58,5 @@ POSTHOOK: Input: default@acid_utt -1072076362 2uLyD28144vklju213J1mr -1071480828 aw724t8c5558x2xneC624 -1071363017 Anj0oF --1070883071 fred -1070551679 iUR3Q -1069736047 k17Am8uPHWk02cEf1jet