hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jcama...@apache.org
Subject hive git commit: HIVE-18416: Initial support for TABLE function (Jesus Camacho Rodriguez, reviewed by Ashutosh Chauhan) (addendum II)
Date Sat, 13 Jan 2018 20:44:28 GMT
Repository: hive
Updated Branches:
  refs/heads/master b1cdbc60d -> ac247817f


HIVE-18416: Initial support for TABLE function (Jesus Camacho Rodriguez, reviewed by Ashutosh
Chauhan) (addendum II)

* Fix dangling tests


Project: http://git-wip-us.apache.org/repos/asf/hive/repo
Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/ac247817
Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/ac247817
Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/ac247817

Branch: refs/heads/master
Commit: ac247817f441eba5daf5b07cc831347d1c762ee4
Parents: b1cdbc6
Author: Jesus Camacho Rodriguez <jcamacho@apache.org>
Authored: Sat Jan 13 12:44:18 2018 -0800
Committer: Jesus Camacho Rodriguez <jcamacho@apache.org>
Committed: Sat Jan 13 12:44:18 2018 -0800

----------------------------------------------------------------------
 .../hive/ql/lockmgr/TestDbTxnManager2.java      | 18 ++++++++----
 ...rialized_view_no_transactional_rewrite.q.out |  8 ++++--
 ...alized_view_no_transactional_rewrite_2.q.out |  8 ++++--
 .../results/clientpositive/llap/llap_smb.q.out  |  2 +-
 .../materialized_view_create_rewrite_4.q.out    | 30 ++++++++++++--------
 5 files changed, 41 insertions(+), 25 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/ac247817/ql/src/test/org/apache/hadoop/hive/ql/lockmgr/TestDbTxnManager2.java
----------------------------------------------------------------------
diff --git a/ql/src/test/org/apache/hadoop/hive/ql/lockmgr/TestDbTxnManager2.java b/ql/src/test/org/apache/hadoop/hive/ql/lockmgr/TestDbTxnManager2.java
index ec9c3b3..dd10be9 100644
--- a/ql/src/test/org/apache/hadoop/hive/ql/lockmgr/TestDbTxnManager2.java
+++ b/ql/src/test/org/apache/hadoop/hive/ql/lockmgr/TestDbTxnManager2.java
@@ -1832,10 +1832,14 @@ public class TestDbTxnManager2 {
       TxnDbUtil.countQueryAgent(conf, "select count(*) from TXN_COMPONENTS where tc_txnid="
+ txnid1));
 
     List<ShowLocksResponseElement> locks = getLocks(txnMgr);
-    Assert.assertEquals("Unexpected lock count", 2, locks.size());
-    checkLock(causeConflict ? LockType.SHARED_WRITE : LockType.SHARED_READ,
-      LockState.ACQUIRED, "default", "target", null, locks);
-    checkLock(LockType.SHARED_READ, LockState.ACQUIRED, "_dummy_database", "_dummy_table",
null, locks);
+    if (causeConflict) {
+      Assert.assertEquals("Unexpected lock count", 1, locks.size());
+      checkLock(LockType.SHARED_WRITE, LockState.ACQUIRED, "default", "target", null, locks);
+    } else {
+      Assert.assertEquals("Unexpected lock count", 2, locks.size());
+      checkLock(LockType.SHARED_READ, LockState.ACQUIRED, "default", "target", null, locks);
+      checkLock(LockType.SHARED_READ, LockState.ACQUIRED, "_dummy_database", "_dummy_table",
null, locks);
+    }
 
     DbTxnManager txnMgr2 = (DbTxnManager) TxnManagerFactory.getTxnManagerFactory().getTxnManager(conf);
     swapTxnManager(txnMgr2);
@@ -1848,13 +1852,15 @@ public class TestDbTxnManager2 {
     txnMgr2.acquireLocks(driver.getPlan(), ctx, "T2", false);
     locks = getLocks();
 
-    Assert.assertEquals("Unexpected lock count", 4, locks.size());
+    Assert.assertEquals("Unexpected lock count", causeConflict ? 3 : 4, locks.size());
     checkLock(LockType.SHARED_WRITE, LockState.ACQUIRED, "default", "target", null, locks);
-    checkLock(LockType.SHARED_READ, LockState.ACQUIRED, "_dummy_database", "_dummy_table",
null, locks);
     checkLock(LockType.SHARED_READ, causeConflict ? LockState.WAITING : LockState.ACQUIRED,
       "default", "source", null, locks);
     long extLockId = checkLock(LockType.SHARED_WRITE, causeConflict ? LockState.WAITING :
LockState.ACQUIRED,
       "default", "target", null, locks).getLockid();
+    if (!causeConflict) {
+      checkLock(LockType.SHARED_READ, LockState.ACQUIRED, "_dummy_database", "_dummy_table",
null, locks);
+    }
 
     txnMgr.commitTxn();//commit T1
 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac247817/ql/src/test/results/clientnegative/materialized_view_no_transactional_rewrite.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientnegative/materialized_view_no_transactional_rewrite.q.out
b/ql/src/test/results/clientnegative/materialized_view_no_transactional_rewrite.q.out
index a22df2c..abb3d96 100644
--- a/ql/src/test/results/clientnegative/materialized_view_no_transactional_rewrite.q.out
+++ b/ql/src/test/results/clientnegative/materialized_view_no_transactional_rewrite.q.out
@@ -8,11 +8,13 @@ POSTHOOK: Output: database:default
 POSTHOOK: Output: default@cmv_basetable
 PREHOOK: query: insert into cmv_basetable values (1, 'alfred', 10.30),(2, 'bob', 3.14),(2,
'bonnie', 172342.2),(3, 'calvin', 978.76),(3, 'charlie', 9.8)
 PREHOOK: type: QUERY
+PREHOOK: Input: _dummy_database@_dummy_table
 PREHOOK: Output: default@cmv_basetable
 POSTHOOK: query: insert into cmv_basetable values (1, 'alfred', 10.30),(2, 'bob', 3.14),(2,
'bonnie', 172342.2),(3, 'calvin', 978.76),(3, 'charlie', 9.8)
 POSTHOOK: type: QUERY
+POSTHOOK: Input: _dummy_database@_dummy_table
 POSTHOOK: Output: default@cmv_basetable
-POSTHOOK: Lineage: cmv_basetable.a EXPRESSION [(values__tmp__table__1)values__tmp__table__1.FieldSchema(name:tmp_values_col1,
type:string, comment:), ]
-POSTHOOK: Lineage: cmv_basetable.b EXPRESSION [(values__tmp__table__1)values__tmp__table__1.FieldSchema(name:tmp_values_col2,
type:string, comment:), ]
-POSTHOOK: Lineage: cmv_basetable.c EXPRESSION [(values__tmp__table__1)values__tmp__table__1.FieldSchema(name:tmp_values_col3,
type:string, comment:), ]
+POSTHOOK: Lineage: cmv_basetable.a SCRIPT []
+POSTHOOK: Lineage: cmv_basetable.b SCRIPT []
+POSTHOOK: Lineage: cmv_basetable.c SCRIPT []
 FAILED: SemanticException org.apache.hadoop.hive.ql.parse.SemanticException: Automatic rewriting
for materialized view cannot be enabled if the materialized view uses non-transactional tables

http://git-wip-us.apache.org/repos/asf/hive/blob/ac247817/ql/src/test/results/clientnegative/materialized_view_no_transactional_rewrite_2.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientnegative/materialized_view_no_transactional_rewrite_2.q.out
b/ql/src/test/results/clientnegative/materialized_view_no_transactional_rewrite_2.q.out
index 175f76a..481207f 100644
--- a/ql/src/test/results/clientnegative/materialized_view_no_transactional_rewrite_2.q.out
+++ b/ql/src/test/results/clientnegative/materialized_view_no_transactional_rewrite_2.q.out
@@ -8,13 +8,15 @@ POSTHOOK: Output: database:default
 POSTHOOK: Output: default@cmv_basetable
 PREHOOK: query: insert into cmv_basetable values (1, 'alfred', 10.30),(2, 'bob', 3.14),(2,
'bonnie', 172342.2),(3, 'calvin', 978.76),(3, 'charlie', 9.8)
 PREHOOK: type: QUERY
+PREHOOK: Input: _dummy_database@_dummy_table
 PREHOOK: Output: default@cmv_basetable
 POSTHOOK: query: insert into cmv_basetable values (1, 'alfred', 10.30),(2, 'bob', 3.14),(2,
'bonnie', 172342.2),(3, 'calvin', 978.76),(3, 'charlie', 9.8)
 POSTHOOK: type: QUERY
+POSTHOOK: Input: _dummy_database@_dummy_table
 POSTHOOK: Output: default@cmv_basetable
-POSTHOOK: Lineage: cmv_basetable.a EXPRESSION [(values__tmp__table__1)values__tmp__table__1.FieldSchema(name:tmp_values_col1,
type:string, comment:), ]
-POSTHOOK: Lineage: cmv_basetable.b EXPRESSION [(values__tmp__table__1)values__tmp__table__1.FieldSchema(name:tmp_values_col2,
type:string, comment:), ]
-POSTHOOK: Lineage: cmv_basetable.c EXPRESSION [(values__tmp__table__1)values__tmp__table__1.FieldSchema(name:tmp_values_col3,
type:string, comment:), ]
+POSTHOOK: Lineage: cmv_basetable.a SCRIPT []
+POSTHOOK: Lineage: cmv_basetable.b SCRIPT []
+POSTHOOK: Lineage: cmv_basetable.c SCRIPT []
 PREHOOK: query: create materialized view cmv_mat_view as select a, b, c from cmv_basetable
 PREHOOK: type: CREATE_MATERIALIZED_VIEW
 PREHOOK: Input: default@cmv_basetable

http://git-wip-us.apache.org/repos/asf/hive/blob/ac247817/ql/src/test/results/clientpositive/llap/llap_smb.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/llap_smb.q.out b/ql/src/test/results/clientpositive/llap/llap_smb.q.out
index 35d4802..d23dfe8 100644
--- a/ql/src/test/results/clientpositive/llap/llap_smb.q.out
+++ b/ql/src/test/results/clientpositive/llap/llap_smb.q.out
@@ -234,7 +234,7 @@ STAGE PLANS:
                         0 id (type: bigint)
                         1 id (type: bigint)
                       outputColumnNames: _col2, _col3
-                      Statistics: Num rows: 985 Data size: 7880 Basic stats: COMPLETE Column
stats: COMPLETE
+                      Statistics: Num rows: 987 Data size: 7896 Basic stats: COMPLETE Column
stats: COMPLETE
                       Group By Operator
                         aggregations: count()
                         keys: _col2 (type: int), _col3 (type: smallint)

http://git-wip-us.apache.org/repos/asf/hive/blob/ac247817/ql/src/test/results/clientpositive/materialized_view_create_rewrite_4.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/materialized_view_create_rewrite_4.q.out b/ql/src/test/results/clientpositive/materialized_view_create_rewrite_4.q.out
index 7880fe8..8ab1517 100644
--- a/ql/src/test/results/clientpositive/materialized_view_create_rewrite_4.q.out
+++ b/ql/src/test/results/clientpositive/materialized_view_create_rewrite_4.q.out
@@ -13,6 +13,7 @@ PREHOOK: query: insert into cmv_basetable values
  (3, 'calvin', 978.76, 3),
  (3, 'charlie', 9.8, 1)
 PREHOOK: type: QUERY
+PREHOOK: Input: _dummy_database@_dummy_table
 PREHOOK: Output: default@cmv_basetable
 POSTHOOK: query: insert into cmv_basetable values
  (1, 'alfred', 10.30, 2),
@@ -21,11 +22,12 @@ POSTHOOK: query: insert into cmv_basetable values
  (3, 'calvin', 978.76, 3),
  (3, 'charlie', 9.8, 1)
 POSTHOOK: type: QUERY
+POSTHOOK: Input: _dummy_database@_dummy_table
 POSTHOOK: Output: default@cmv_basetable
-POSTHOOK: Lineage: cmv_basetable.a EXPRESSION [(values__tmp__table__1)values__tmp__table__1.FieldSchema(name:tmp_values_col1,
type:string, comment:), ]
-POSTHOOK: Lineage: cmv_basetable.b EXPRESSION [(values__tmp__table__1)values__tmp__table__1.FieldSchema(name:tmp_values_col2,
type:string, comment:), ]
-POSTHOOK: Lineage: cmv_basetable.c EXPRESSION [(values__tmp__table__1)values__tmp__table__1.FieldSchema(name:tmp_values_col3,
type:string, comment:), ]
-POSTHOOK: Lineage: cmv_basetable.d EXPRESSION [(values__tmp__table__1)values__tmp__table__1.FieldSchema(name:tmp_values_col4,
type:string, comment:), ]
+POSTHOOK: Lineage: cmv_basetable.a SCRIPT []
+POSTHOOK: Lineage: cmv_basetable.b SCRIPT []
+POSTHOOK: Lineage: cmv_basetable.c SCRIPT []
+POSTHOOK: Lineage: cmv_basetable.d SCRIPT []
 PREHOOK: query: analyze table cmv_basetable compute statistics for columns
 PREHOOK: type: QUERY
 PREHOOK: Input: default@cmv_basetable
@@ -48,16 +50,18 @@ PREHOOK: query: insert into cmv_basetable_2 values
  (1, 'alfred', 10.30, 2),
  (3, 'calvin', 978.76, 3)
 PREHOOK: type: QUERY
+PREHOOK: Input: _dummy_database@_dummy_table
 PREHOOK: Output: default@cmv_basetable_2
 POSTHOOK: query: insert into cmv_basetable_2 values
  (1, 'alfred', 10.30, 2),
  (3, 'calvin', 978.76, 3)
 POSTHOOK: type: QUERY
+POSTHOOK: Input: _dummy_database@_dummy_table
 POSTHOOK: Output: default@cmv_basetable_2
-POSTHOOK: Lineage: cmv_basetable_2.a EXPRESSION [(values__tmp__table__2)values__tmp__table__2.FieldSchema(name:tmp_values_col1,
type:string, comment:), ]
-POSTHOOK: Lineage: cmv_basetable_2.b EXPRESSION [(values__tmp__table__2)values__tmp__table__2.FieldSchema(name:tmp_values_col2,
type:string, comment:), ]
-POSTHOOK: Lineage: cmv_basetable_2.c EXPRESSION [(values__tmp__table__2)values__tmp__table__2.FieldSchema(name:tmp_values_col3,
type:string, comment:), ]
-POSTHOOK: Lineage: cmv_basetable_2.d EXPRESSION [(values__tmp__table__2)values__tmp__table__2.FieldSchema(name:tmp_values_col4,
type:string, comment:), ]
+POSTHOOK: Lineage: cmv_basetable_2.a SCRIPT []
+POSTHOOK: Lineage: cmv_basetable_2.b SCRIPT []
+POSTHOOK: Lineage: cmv_basetable_2.c SCRIPT []
+POSTHOOK: Lineage: cmv_basetable_2.d SCRIPT []
 PREHOOK: query: analyze table cmv_basetable_2 compute statistics for columns
 PREHOOK: type: QUERY
 PREHOOK: Input: default@cmv_basetable_2
@@ -340,15 +344,17 @@ POSTHOOK: Input: default@cmv_basetable_2
 PREHOOK: query: insert into cmv_basetable_2 values
  (3, 'charlie', 15.8, 1)
 PREHOOK: type: QUERY
+PREHOOK: Input: _dummy_database@_dummy_table
 PREHOOK: Output: default@cmv_basetable_2
 POSTHOOK: query: insert into cmv_basetable_2 values
  (3, 'charlie', 15.8, 1)
 POSTHOOK: type: QUERY
+POSTHOOK: Input: _dummy_database@_dummy_table
 POSTHOOK: Output: default@cmv_basetable_2
-POSTHOOK: Lineage: cmv_basetable_2.a EXPRESSION [(values__tmp__table__3)values__tmp__table__3.FieldSchema(name:tmp_values_col1,
type:string, comment:), ]
-POSTHOOK: Lineage: cmv_basetable_2.b EXPRESSION [(values__tmp__table__3)values__tmp__table__3.FieldSchema(name:tmp_values_col2,
type:string, comment:), ]
-POSTHOOK: Lineage: cmv_basetable_2.c EXPRESSION [(values__tmp__table__3)values__tmp__table__3.FieldSchema(name:tmp_values_col3,
type:string, comment:), ]
-POSTHOOK: Lineage: cmv_basetable_2.d EXPRESSION [(values__tmp__table__3)values__tmp__table__3.FieldSchema(name:tmp_values_col4,
type:string, comment:), ]
+POSTHOOK: Lineage: cmv_basetable_2.a SCRIPT []
+POSTHOOK: Lineage: cmv_basetable_2.b SCRIPT []
+POSTHOOK: Lineage: cmv_basetable_2.c SCRIPT []
+POSTHOOK: Lineage: cmv_basetable_2.d SCRIPT []
 PREHOOK: query: analyze table cmv_basetable_2 compute statistics for columns
 PREHOOK: type: QUERY
 PREHOOK: Input: default@cmv_basetable_2


Mime
View raw message