File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/util Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -58,15 +58,13 @@ class Iso8601DateTimeFormatter(
58
58
}
59
59
}
60
60
61
- private def instantToMicros (instant : Instant , secMul : Long , nanoDiv : Long ): Long = {
62
- val sec = Math .multiplyExact(instant.getEpochSecond, secMul )
63
- val result = Math .addExact(sec, instant.getNano / nanoDiv )
61
+ private def instantToMicros (instant : Instant ): Long = {
62
+ val sec = Math .multiplyExact(instant.getEpochSecond, DateTimeUtils . MICROS_PER_SECOND )
63
+ val result = Math .addExact(sec, instant.getNano / DateTimeUtils . NANOS_PER_MICROS )
64
64
result
65
65
}
66
66
67
- def parse (s : String ): Long = {
68
- instantToMicros(toInstant(s), DateTimeUtils .MICROS_PER_SECOND , DateTimeUtils .NANOS_PER_MICROS )
69
- }
67
+ def parse (s : String ): Long = instantToMicros(toInstant(s))
70
68
71
69
def format (us : Long ): String = {
72
70
val secs = Math .floorDiv(us, DateTimeUtils .MICROS_PER_SECOND )
You can’t perform that action at this time.
0 commit comments