From e5e381cb736d17a0de2bc52f97c5df20777bd8bc Mon Sep 17 00:00:00 2001 From: Qingping Hou Date: Sat, 25 Sep 2021 22:16:37 -0700 Subject: [PATCH] ARROW-13977: [Format] clarify leap seconds for interval type Like other time units, we don't account for leap seconds for interval types. For MONTH_DAY_NANO, we do account for leap days. Closes #11138 from houqp/qp_interval Authored-by: Qingping Hou Signed-off-by: Qingping Hou --- format/Schema.fbs | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/format/Schema.fbs b/format/Schema.fbs index 0ee23bbe3d169..7ee827b5de8da 100644 --- a/format/Schema.fbs +++ b/format/Schema.fbs @@ -357,18 +357,19 @@ enum IntervalUnit: short { YEAR_MONTH, DAY_TIME, MONTH_DAY_NANO} // days can differ in length during day light savings time transitions). // All integers in the types below are stored in the endianness indicated // by the schema. +// // YEAR_MONTH - Indicates the number of elapsed whole months, stored as // 4-byte signed integers. -// DAY_TIME - Indicates the number of elapsed days and milliseconds, -// stored as 2 contiguous 32-bit integers (8-bytes in total). Support +// DAY_TIME - Indicates the number of elapsed days and milliseconds (no leap seconds), +// stored as 2 contiguous 32-bit signed integers (8-bytes in total). Support // of this IntervalUnit is not required for full arrow compatibility. // MONTH_DAY_NANO - A triple of the number of elapsed months, days, and nanoseconds. -// The values are stored contiguously in 16 byte blocks. Months and -// days are encoded as 32 bit integers and nanoseconds is encoded as a -// 64 bit integer. All integers are signed. Each field is independent -// (e.g. there is no constraint that nanoseconds have the same sign -// as days or that the quantity of nanoseconds represents less -// than a day's worth of time). +// The values are stored contiguously in 16-byte blocks. Months and days are +// encoded as 32-bit signed integers and nanoseconds is encoded as a 64-bit +// signed integer. Nanoseconds does not allow for leap seconds. Each field is +// independent (e.g. there is no constraint that nanoseconds have the same +// sign as days or that the quantity of nanoseconds represents less than a +// day's worth of time). table Interval { unit: IntervalUnit; }