gh-yzou commented on code in PR #496:
URL: https://github.com/apache/parquet-format/pull/496#discussion_r2234692508


##########
LogicalTypes.md:
##########
@@ -539,6 +544,27 @@ The sort order used for `INTERVAL` is undefined. When 
writing data, no min/max
 statistics should be saved for this type and if such non-compliant statistics
 are found during reading, they must be ignored.
 
+#### YEAR_MONTH_INTERVAL
+
+`YEAR_MONTH_INTERVAL` is used to represent a year-month time interval, such as
+`4 years and 6 months`. It must annotate an `int32` that stores the total 
number
+of months as a signed integer, which represents the interval and can be 
negative.
+The time duration is independent of any timezone.
+
+#### DURATION
+
+`DURATION` is used to represent a span of time, such as `5 days`. It must 
+annotate an `int64` value that stores the total number of time units for the 
+duration. The value is a signed integer and can be negative to indicate 
backward duration.
+The duration is purely a measure of time and is independent of any time zone.
+
+The `DURATION` type takes `unit` as a parameter, and the value must be one of
+`MILLIS`, `MICROS` or  `NANOS`.
+
+Duration of 1 day is defined exactly of 24 hours, regardless of the specific 
number of 

Review Comment:
   make sense. mentioned ANSI SQL standard in the description



##########
src/main/thrift/parquet.thrift:
##########
@@ -461,6 +461,30 @@ struct GeographyType {
   2: optional EdgeInterpolationAlgorithm algorithm;
 }
 
+/**
+ * Year-Month Interval logical type annotation
+ *
+ * The data is stored as an 4 byte signed integer which represents the number
+ * of months associated with the time interval. The value can be negative to
+ * indicate a backward duration.
+ *
+ * Allowed for physical type: INT32
+ */
+struct YearMonthIntervalType {
+}
+
+/**
+ * Day-Time Interval logical type annotation

Review Comment:
   updated



##########
LogicalTypes.md:
##########
@@ -539,6 +544,27 @@ The sort order used for `INTERVAL` is undefined. When 
writing data, no min/max
 statistics should be saved for this type and if such non-compliant statistics
 are found during reading, they must be ignored.
 
+#### YEAR_MONTH_INTERVAL
+
+`YEAR_MONTH_INTERVAL` is used to represent a year-month time interval, such as
+`4 years and 6 months`. It must annotate an `int32` that stores the total 
number
+of months as a signed integer, which represents the interval and can be 
negative.

Review Comment:
   added description about the restriction.



##########
LogicalTypes.md:
##########
@@ -539,6 +544,27 @@ The sort order used for `INTERVAL` is undefined. When 
writing data, no min/max
 statistics should be saved for this type and if such non-compliant statistics
 are found during reading, they must be ignored.
 
+#### YEAR_MONTH_INTERVAL
+
+`YEAR_MONTH_INTERVAL` is used to represent a year-month time interval, such as
+`4 years and 6 months`. It must annotate an `int32` that stores the total 
number
+of months as a signed integer, which represents the interval and can be 
negative.
+The time duration is independent of any timezone.

Review Comment:
   sg! deleted



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to