Github user cloud-fan commented on a diff in the pull request:

    https://github.com/apache/spark/pull/16308#discussion_r97554829
  
    --- Diff: 
sql/core/src/test/scala/org/apache/spark/sql/DateFunctionsSuite.scala ---
    @@ -475,6 +1164,45 @@ class DateFunctionsSuite extends QueryTest with 
SharedSQLContext {
           Row(ts1.getTime / 1000L), Row(ts2.getTime / 1000L)))
       }
     
    +  test("to_unix_timestamp with session local timezone") {
    --- End diff --
    
    I don't think we need to add tests in this file at all. We should improve 
`DateTimeUtilsSuite` to make sure the newly added methods work well with 
different timezones, e.g. `getHours`, `daysToMillions`, etc. Then make sure 
these timezone aware expressions will call the newly added methods in 
`DateTimeUtils` which has timezone parameter(we can remove the old versions 
that don't take timezone parameter, after we finish handling partition values).
    
    This suite is end-to-end test, and it's very annoying if we wanna test all 
changed expressions, we should write more low-level tests in 
`DateTimeUtilsSuite`.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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

Reply via email to