Skip to content

Commit 114eb37

Browse files
committed
change another way to explain
1 parent 8890595 commit 114eb37

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

common/unsafe/src/main/java/org/apache/spark/unsafe/types/CalendarInterval.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,10 @@ public final class CalendarInterval implements Serializable, Comparable<Calendar
3434
public final int days;
3535
public final long microseconds;
3636

37-
// Previous CalendarInterval has 2 fields: months and microseconds. Here we add one more days
38-
// fields due to one logical day interval may have different number of microseconds (daylight
39-
// saving).
37+
// CalendarInterval is represented by months, days and microseconds. Months and days are not
38+
// units of time with a constant length (unlike hours, seconds), so they are two separated fields
39+
// from microseconds. One month may be equal to 29, 30 or 31 days and one day may be equal to
40+
// 23, 24 or 25 hours (daylight saving)
4041
public CalendarInterval(int months, int days, long microseconds) {
4142
this.months = months;
4243
this.days = days;

0 commit comments

Comments
 (0)