Le 13/09/2021 à 06:00, QP Hou a écrit :
Hi, I would like to draw some attention to a format PR aiming to clarify leap seconds, leap days and daylight saving handling semantics for duration types: https://github.com/apache/arrow/pull/11138. This came out of the effort [1] trying to implement Partial and Total order for duration type DAY_TIME and MONTH_DAY_NANO.
The Duration type is defined with a TimeUnit. You are probably thinking about the Interval type.
In short, I am proposing we clarify the followings in the spec: * For DAY_TIME duration, similar to Time and Timestamp, we do not take leap seconds into account. But we take daylight saving into account. As a result, days=1,ms=86400000 does not equal to days=2,ms=0.
This sounds ok and matches the idea that a duration is the logical difference between two different calendar points, not two physical time points.
* For MONTH_DAY_NANO, we do not take leap seconds into account. But we take leap days into account. Whether we take leap days into account doesn't really have a big impact here because the number of days in a month already varies even without leap days.
Ok. How about daylight savings? I suppose they are taken into account as well.
Regards Antoine.