emkornfield commented on code in PR #496:
URL: https://github.com/apache/parquet-format/pull/496#discussion_r2156148392
##########
src/main/thrift/parquet.thrift:
##########
@@ -461,6 +461,29 @@ 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 IntervalYearMonthType {
+}
+
+/**
+ * Month-Day Interval logical type annotation
+ *
+ * The data is stored as a 16-byte signed value, which represents the number
Review Comment:
> Nanosecond timestamps are 8 byte though right? So it's not just a trivial
addition (if we're using 16 bytes here)
Yes you are correct, but for most cases I imagine the 8 most significant
bytes will be sign extension which is likely slightly cheaper to check and mask
out then force multiplications.
> MonthDayNano has a 32-bit months field and 64-bit nanos field which
together I would think gives you full precision for 10,000 years? (As the spec
says there is no constraint on how many seconds are in the nanos field.)
Taken in aggregate then give you 10,000 years. I was referring to only the
nanosecond portion (Arrow specifically calls out that each field is
independent). Days was specifically in Arrow where meant to be a "calendar"
type which might not be 24 hours (which is what postgres does) so the 10K year
coverage using Arrow definitions would be slightly different semantics, then
this representation.
--
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]