Repository: spark
Updated Branches:
  refs/heads/master 0a2e45fdb -> a3004d084


[SPARK-25971][SQL] Ignore partition byte-size statistics in SQLQueryTestSuite

## What changes were proposed in this pull request?

Currently, `SQLQueryTestSuite` is sensitive in terms of the bytes of parquet 
files in table partitions. If we change the default file format (from Parquet 
to ORC) or update the metadata of them, the test case should be changed 
accordingly. This PR aims to make `SQLQueryTestSuite` more robust by ignoring 
the partition byte statistics.
```
-Partition Statistics   1144 bytes, 2 rows
+Partition Statistics   [not included in comparison] bytes, 2 rows
```

## How was this patch tested?

Pass the Jenkins with the newly updated test cases.

Closes #22972 from dongjoon-hyun/SPARK-25971.

Authored-by: Dongjoon Hyun <dongj...@apache.org>
Signed-off-by: Dongjoon Hyun <dongj...@apache.org>


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

Branch: refs/heads/master
Commit: a3004d084c654237c60d02df1507333b92b860c6
Parents: 0a2e45f
Author: Dongjoon Hyun <dongj...@apache.org>
Authored: Thu Nov 8 03:40:28 2018 -0800
Committer: Dongjoon Hyun <dongj...@apache.org>
Committed: Thu Nov 8 03:40:28 2018 -0800

----------------------------------------------------------------------
 .../results/describe-part-after-analyze.sql.out         | 12 ++++++------
 .../scala/org/apache/spark/sql/SQLQueryTestSuite.scala  |  1 +
 2 files changed, 7 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/spark/blob/a3004d08/sql/core/src/test/resources/sql-tests/results/describe-part-after-analyze.sql.out
----------------------------------------------------------------------
diff --git 
a/sql/core/src/test/resources/sql-tests/results/describe-part-after-analyze.sql.out
 
b/sql/core/src/test/resources/sql-tests/results/describe-part-after-analyze.sql.out
index 8ba69c6..17dd317 100644
--- 
a/sql/core/src/test/resources/sql-tests/results/describe-part-after-analyze.sql.out
+++ 
b/sql/core/src/test/resources/sql-tests/results/describe-part-after-analyze.sql.out
@@ -93,7 +93,7 @@ Partition Values      [ds=2017-08-01, hr=10]
 Location [not included in 
comparison]sql/core/spark-warehouse/t/ds=2017-08-01/hr=10                       
 
 Created Time [not included in comparison]
 Last Access [not included in comparison]
-Partition Statistics   1121 bytes, 3 rows                          
+Partition Statistics   [not included in comparison] bytes, 3 rows              
            
                                                                    
 # Storage Information                                              
 Location [not included in comparison]sql/core/spark-warehouse/t
@@ -128,7 +128,7 @@ Partition Values            [ds=2017-08-01, hr=10]
 Location [not included in 
comparison]sql/core/spark-warehouse/t/ds=2017-08-01/hr=10                       
 
 Created Time [not included in comparison]
 Last Access [not included in comparison]
-Partition Statistics   1121 bytes, 3 rows                          
+Partition Statistics   [not included in comparison] bytes, 3 rows              
            
                                                                    
 # Storage Information                                              
 Location [not included in comparison]sql/core/spark-warehouse/t
@@ -155,7 +155,7 @@ Partition Values            [ds=2017-08-01, hr=11]
 Location [not included in 
comparison]sql/core/spark-warehouse/t/ds=2017-08-01/hr=11                       
 
 Created Time [not included in comparison]
 Last Access [not included in comparison]
-Partition Statistics   1098 bytes, 4 rows                          
+Partition Statistics   [not included in comparison] bytes, 4 rows              
            
                                                                    
 # Storage Information                                              
 Location [not included in comparison]sql/core/spark-warehouse/t
@@ -190,7 +190,7 @@ Partition Values            [ds=2017-08-01, hr=10]
 Location [not included in 
comparison]sql/core/spark-warehouse/t/ds=2017-08-01/hr=10                       
 
 Created Time [not included in comparison]
 Last Access [not included in comparison]
-Partition Statistics   1121 bytes, 3 rows                          
+Partition Statistics   [not included in comparison] bytes, 3 rows              
            
                                                                    
 # Storage Information                                              
 Location [not included in comparison]sql/core/spark-warehouse/t
@@ -217,7 +217,7 @@ Partition Values            [ds=2017-08-01, hr=11]
 Location [not included in 
comparison]sql/core/spark-warehouse/t/ds=2017-08-01/hr=11                       
 
 Created Time [not included in comparison]
 Last Access [not included in comparison]
-Partition Statistics   1098 bytes, 4 rows                          
+Partition Statistics   [not included in comparison] bytes, 4 rows              
            
                                                                    
 # Storage Information                                              
 Location [not included in comparison]sql/core/spark-warehouse/t
@@ -244,7 +244,7 @@ Partition Values            [ds=2017-09-01, hr=5]
 Location [not included in 
comparison]sql/core/spark-warehouse/t/ds=2017-09-01/hr=5                        
 
 Created Time [not included in comparison]
 Last Access [not included in comparison]
-Partition Statistics   1144 bytes, 2 rows                          
+Partition Statistics   [not included in comparison] bytes, 2 rows              
            
                                                                    
 # Storage Information                                              
 Location [not included in comparison]sql/core/spark-warehouse/t

http://git-wip-us.apache.org/repos/asf/spark/blob/a3004d08/sql/core/src/test/scala/org/apache/spark/sql/SQLQueryTestSuite.scala
----------------------------------------------------------------------
diff --git 
a/sql/core/src/test/scala/org/apache/spark/sql/SQLQueryTestSuite.scala 
b/sql/core/src/test/scala/org/apache/spark/sql/SQLQueryTestSuite.scala
index 826408c..6ca3ac5 100644
--- a/sql/core/src/test/scala/org/apache/spark/sql/SQLQueryTestSuite.scala
+++ b/sql/core/src/test/scala/org/apache/spark/sql/SQLQueryTestSuite.scala
@@ -272,6 +272,7 @@ class SQLQueryTestSuite extends QueryTest with 
SharedSQLContext {
         .replaceAll("Created By.*", s"Created By $notIncludedMsg")
         .replaceAll("Created Time.*", s"Created Time $notIncludedMsg")
         .replaceAll("Last Access.*", s"Last Access $notIncludedMsg")
+        .replaceAll("Partition Statistics\t\\d+", s"Partition 
Statistics\t$notIncludedMsg")
         .replaceAll("\\*\\(\\d+\\) ", "*"))  // remove the WholeStageCodegen 
codegenStageIds
 
       // If the output is not pre-sorted, sort it.


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@spark.apache.org
For additional commands, e-mail: commits-h...@spark.apache.org

Reply via email to