You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2021/08/11 22:23:42 UTC

[GitHub] [arrow] emkornfield commented on a change in pull request #10177: [Proposal] Add MONTH_DAY_NANO interval type

emkornfield commented on a change in pull request #10177:
URL: https://github.com/apache/arrow/pull/10177#discussion_r687235420



##########
File path: format/Schema.fbs
##########
@@ -246,15 +251,24 @@ table Timestamp {
   timezone: string;
 }
 
-enum IntervalUnit: short { YEAR_MONTH, DAY_TIME}
+enum IntervalUnit: short { YEAR_MONTH, DAY_TIME, MONTH_DAY_NANO}
 // A "calendar" interval which models types that don't necessarily
 // have a precise duration without the context of a base timestamp (e.g.
 // 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 integers.
+//   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
 //   of this IntervalUnit is not required for full arrow compatibility.
+// MONTH_DAY_NANO - A triple of # 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 quantitiy of nanoseconds represents less

Review comment:
       done.

##########
File path: format/Schema.fbs
##########
@@ -246,15 +251,24 @@ table Timestamp {
   timezone: string;
 }
 
-enum IntervalUnit: short { YEAR_MONTH, DAY_TIME}
+enum IntervalUnit: short { YEAR_MONTH, DAY_TIME, MONTH_DAY_NANO}
 // A "calendar" interval which models types that don't necessarily
 // have a precise duration without the context of a base timestamp (e.g.
 // 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 integers.
+//   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
 //   of this IntervalUnit is not required for full arrow compatibility.
+// MONTH_DAY_NANO - A triple of # of elapsed months, days, and nanoseconds.

Review comment:
       done.

##########
File path: format/Schema.fbs
##########
@@ -246,15 +251,24 @@ table Timestamp {
   timezone: string;
 }
 
-enum IntervalUnit: short { YEAR_MONTH, DAY_TIME}
+enum IntervalUnit: short { YEAR_MONTH, DAY_TIME, MONTH_DAY_NANO}
 // A "calendar" interval which models types that don't necessarily
 // have a precise duration without the context of a base timestamp (e.g.
 // 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 integers.
+//   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
 //   of this IntervalUnit is not required for full arrow compatibility.
+// MONTH_DAY_NANO - A triple of # 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 quantitiy of nanoseconds represents less
+//   then a day's worth of time).

Review comment:
       done.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org