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

    https://github.com/apache/spark/pull/7473#discussion_r34912321
  
    --- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/util/DateTimeUtils.scala
 ---
    @@ -320,16 +320,17 @@ object DateTimeUtils {
           Calendar.getInstance(
             
TimeZone.getTimeZone(f"GMT${timeZone.get.toChar}${segments(7)}%02d:${segments(8)}%02d"))
         }
    +    c.set(Calendar.MILLISECOND, 0)
     
         if (justTime) {
    -      c.set(Calendar.HOUR, segments(3))
    +      c.set(Calendar.HOUR_OF_DAY, segments(3))
           c.set(Calendar.MINUTE, segments(4))
           c.set(Calendar.SECOND, segments(5))
         } else {
           c.set(segments(0), segments(1) - 1, segments(2), segments(3), 
segments(4), segments(5))
         }
     
    -    Some(c.getTimeInMillis / 1000 * 1000000 + segments(6))
    +    Some(c.getTimeInMillis * 1000 + segments(6))
    --- End diff --
    
    Sorry I didn't get this. Why is divide by 1000 a problem, if the date is 
before 1.1.1970? It's a long value and the last three digits are the millis. In 
order to cut them off, I divide by 1000. This has no impact on the sign or 
anything else, does it?


---
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]

Reply via email to