Github user yhuai commented on a diff in the pull request:

    https://github.com/apache/spark/pull/1440#discussion_r15036800
  
    --- Diff: 
sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/HiveCompatibilitySuite.scala
 ---
    @@ -93,6 +93,10 @@ class HiveCompatibilitySuite extends HiveQueryFileTest 
with BeforeAndAfter {
         "partitions_json",
     
         // Timezone specific test answers.
    +    "timestamp_1",
    --- End diff --
    
    How about we include the following settings in our unit tests?
    ```
    val gmtTimeZone = java.util.TimeZone.getTimeZone("GMT")
    java.util.TimeZone.setDefault(gmtTimeZone)
    ```
    `java.sql.Timestamp` is a subclass of `java.util.Date` and the 
`Timestamp.toString` will refer to the default timezone to generate the string. 
So, I guess if we explicitly set the Timezone, our test results will not be 
affected by the actual Timezone.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to