Repository: spark
Updated Branches:
  refs/heads/branch-2.0 d357ca302 -> c651ff53a


[SPARK-16805][SQL] Log timezone when query result does not match

## What changes were proposed in this pull request?
It is useful to log the timezone when query result does not match, especially 
on build machines that have different timezone from AMPLab Jenkins.

## How was this patch tested?
This is a test-only change.

Author: Reynold Xin <r...@databricks.com>

Closes #14413 from rxin/SPARK-16805.

(cherry picked from commit 579fbcf3bd9717003025caecc0c0b85bcff7ac7f)
Signed-off-by: Yin Huai <yh...@databricks.com>


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

Branch: refs/heads/branch-2.0
Commit: c651ff53adefd0c74c84500e929ed37f8ad668d2
Parents: d357ca3
Author: Reynold Xin <r...@databricks.com>
Authored: Sun Jul 31 18:21:06 2016 -0700
Committer: Yin Huai <yh...@databricks.com>
Committed: Sun Jul 31 18:21:41 2016 -0700

----------------------------------------------------------------------
 sql/core/src/test/scala/org/apache/spark/sql/QueryTest.scala | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/spark/blob/c651ff53/sql/core/src/test/scala/org/apache/spark/sql/QueryTest.scala
----------------------------------------------------------------------
diff --git a/sql/core/src/test/scala/org/apache/spark/sql/QueryTest.scala 
b/sql/core/src/test/scala/org/apache/spark/sql/QueryTest.scala
index b15f38c..e8480a7 100644
--- a/sql/core/src/test/scala/org/apache/spark/sql/QueryTest.scala
+++ b/sql/core/src/test/scala/org/apache/spark/sql/QueryTest.scala
@@ -394,6 +394,9 @@ object QueryTest {
     sameRows(expectedAnswer, sparkAnswer, isSorted).map { results =>
         s"""
         |Results do not match for query:
+        |Timezone: ${TimeZone.getDefault}
+        |Timezone Env: ${sys.env("TZ")}
+        |
         |${df.queryExecution}
         |== Results ==
         |$results


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

Reply via email to