Github user davies commented on the issue:
https://github.com/apache/spark/pull/13652
@JoshRosen If any human time representation is involved, for example,
`2016-06-15 17:22:07.0`, a timezone could be used. In your SQL query, you are
comparing absolute timestamp again human time without timezone, the default
timezone will be used, it will generated different result in different
timezone. If you specify the timezone in the human time, for example,
`2016-06-15 17:22:07.0 PST`, then you will get same result in any timezone.
After extending the range of test cases, just realize another fact: In some
timezone, a whole day in human time could be skipped, for example, 1993-08-21
in Kwajalein timezone, here is the code to show this:
```
scala> TimeZone.getDefault()
res5: java.util.TimeZone =
sun.util.calendar.ZoneInfo[id="Kwajalein",offset=43200000,dstSavings=0,useDaylight=false,transitions=5,lastRule=null]
scala> val ts = java.sql.Date.valueOf("1993-08-19").getTime
ts: Long = 745761600000
scala> (0 to 12).foreach { h => println(new java.sql.Timestamp(ts + h *
3600L * 1000 * 4)) }
1993-08-19 00:00:00.0
1993-08-19 04:00:00.0
1993-08-19 08:00:00.0
1993-08-19 12:00:00.0
1993-08-19 16:00:00.0
1993-08-19 20:00:00.0
1993-08-21 00:00:00.0
1993-08-21 04:00:00.0
1993-08-21 08:00:00.0
1993-08-21 12:00:00.0
1993-08-21 16:00:00.0
1993-08-21 20:00:00.0
1993-08-22 00:00:00.0
```
---
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.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]