HIVE-6727 : Table level stats for external tables are set incorrectly (Bing Li 
via Ashutosh Chauhan)

Signed-off-by: Ashutosh Chauhan <[email protected]>


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

Branch: refs/heads/llap
Commit: 8f4abd1e60b3410558e0a2cb6886334b7d505a98
Parents: 424f650
Author: Bing Li <[email protected]>
Authored: Mon Jun 1 01:35:00 2015 -0700
Committer: Ashutosh Chauhan <[email protected]>
Committed: Mon Jun 1 13:16:56 2015 -0700

----------------------------------------------------------------------
 .../src/java/org/apache/hadoop/hive/metastore/Warehouse.java | 2 +-
 .../encrypted/encryption_join_unencrypted_tbl.q.out          | 8 ++++----
 .../test/results/clientpositive/spark/stats_noscan_2.q.out   | 8 ++++----
 ql/src/test/results/clientpositive/stats_noscan_2.q.out      | 8 ++++----
 4 files changed, 13 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/8f4abd1e/metastore/src/java/org/apache/hadoop/hive/metastore/Warehouse.java
----------------------------------------------------------------------
diff --git a/metastore/src/java/org/apache/hadoop/hive/metastore/Warehouse.java 
b/metastore/src/java/org/apache/hadoop/hive/metastore/Warehouse.java
index fc0e738..011d4d8 100755
--- a/metastore/src/java/org/apache/hadoop/hive/metastore/Warehouse.java
+++ b/metastore/src/java/org/apache/hadoop/hive/metastore/Warehouse.java
@@ -525,7 +525,7 @@ public class Warehouse {
    */
   public FileStatus[] getFileStatusesForUnpartitionedTable(Database db, Table 
table)
       throws MetaException {
-    Path tablePath = getTablePath(db, table.getTableName());
+    Path tablePath = getDnsPath(new Path(table.getSd().getLocation()));
     try {
       FileSystem fileSys = tablePath.getFileSystem(conf);
       return HiveStatsUtils.getFileStatusRecurse(tablePath, -1, fileSys);

http://git-wip-us.apache.org/repos/asf/hive/blob/8f4abd1e/ql/src/test/results/clientpositive/encrypted/encryption_join_unencrypted_tbl.q.out
----------------------------------------------------------------------
diff --git 
a/ql/src/test/results/clientpositive/encrypted/encryption_join_unencrypted_tbl.q.out
 
b/ql/src/test/results/clientpositive/encrypted/encryption_join_unencrypted_tbl.q.out
index 9b6f750..644c3ed 100644
--- 
a/ql/src/test/results/clientpositive/encrypted/encryption_join_unencrypted_tbl.q.out
+++ 
b/ql/src/test/results/clientpositive/encrypted/encryption_join_unencrypted_tbl.q.out
@@ -628,13 +628,13 @@ STAGE PLANS:
               columns.types int:string
 #### A masked pattern was here ####
               name default.encrypted_table
-              numFiles 0
+              numFiles 1
               numRows 0
               rawDataSize 0
               serialization.ddl struct encrypted_table { i32 key, string value}
               serialization.format 1
               serialization.lib 
org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
-              totalSize 0
+              totalSize 5812
 #### A masked pattern was here ####
             serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
           
@@ -648,13 +648,13 @@ STAGE PLANS:
                 columns.types int:string
 #### A masked pattern was here ####
                 name default.encrypted_table
-                numFiles 0
+                numFiles 1
                 numRows 0
                 rawDataSize 0
                 serialization.ddl struct encrypted_table { i32 key, string 
value}
                 serialization.format 1
                 serialization.lib 
org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
-                totalSize 0
+                totalSize 5812
 #### A masked pattern was here ####
               serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
               name: default.encrypted_table

http://git-wip-us.apache.org/repos/asf/hive/blob/8f4abd1e/ql/src/test/results/clientpositive/spark/stats_noscan_2.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/stats_noscan_2.q.out 
b/ql/src/test/results/clientpositive/spark/stats_noscan_2.q.out
index 238727d..105c222 100644
--- a/ql/src/test/results/clientpositive/spark/stats_noscan_2.q.out
+++ b/ql/src/test/results/clientpositive/spark/stats_noscan_2.q.out
@@ -54,10 +54,10 @@ Table Type:                 EXTERNAL_TABLE
 Table Parameters:               
        COLUMN_STATS_ACCURATE   true                
        EXTERNAL                TRUE                
-       numFiles                0                   
+       numFiles                1                   
        numRows                 -1                  
        rawDataSize             -1                  
-       totalSize               0                   
+       totalSize               11                  
 #### A masked pattern was here ####
                 
 # Storage Information           
@@ -98,10 +98,10 @@ Table Type:                 EXTERNAL_TABLE
 Table Parameters:               
        COLUMN_STATS_ACCURATE   true                
        EXTERNAL                TRUE                
-       numFiles                0                   
+       numFiles                1                   
        numRows                 6                   
        rawDataSize             6                   
-       totalSize               0                   
+       totalSize               11                  
 #### A masked pattern was here ####
                 
 # Storage Information           

http://git-wip-us.apache.org/repos/asf/hive/blob/8f4abd1e/ql/src/test/results/clientpositive/stats_noscan_2.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/stats_noscan_2.q.out 
b/ql/src/test/results/clientpositive/stats_noscan_2.q.out
index 238727d..105c222 100644
--- a/ql/src/test/results/clientpositive/stats_noscan_2.q.out
+++ b/ql/src/test/results/clientpositive/stats_noscan_2.q.out
@@ -54,10 +54,10 @@ Table Type:                 EXTERNAL_TABLE
 Table Parameters:               
        COLUMN_STATS_ACCURATE   true                
        EXTERNAL                TRUE                
-       numFiles                0                   
+       numFiles                1                   
        numRows                 -1                  
        rawDataSize             -1                  
-       totalSize               0                   
+       totalSize               11                  
 #### A masked pattern was here ####
                 
 # Storage Information           
@@ -98,10 +98,10 @@ Table Type:                 EXTERNAL_TABLE
 Table Parameters:               
        COLUMN_STATS_ACCURATE   true                
        EXTERNAL                TRUE                
-       numFiles                0                   
+       numFiles                1                   
        numRows                 6                   
        rawDataSize             6                   
-       totalSize               0                   
+       totalSize               11                  
 #### A masked pattern was here ####
                 
 # Storage Information           

Reply via email to