[
https://issues.apache.org/jira/browse/PARQUET-1387?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16594931#comment-16594931
]
ASF GitHub Bot commented on PARQUET-1387:
-----------------------------------------
gszadovszky closed pull request #102: PARQUET-1387: Nanosecond precision time
and timestamp - parquet-format
URL: https://github.com/apache/parquet-format/pull/102
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git a/LogicalTypes.md b/LogicalTypes.md
index 3be6f211..4c103e2f 100644
--- a/LogicalTypes.md
+++ b/LogicalTypes.md
@@ -256,7 +256,7 @@ The sort order used for `DATE` is signed.
`TIME` is used for a logical time type without a date with millisecond or
microsecond precision.
The type has two type parameters: UTC adjustment (`true` or `false`)
-and precision (`MILLIS` or `MICROS`).
+and precision (`MILLIS` or `MICROS`, `NANOS`).
`TIME` with precision `MILLIS` is used for millisecond precision.
It must annotate an `int32` that stores the number of
@@ -266,6 +266,10 @@ milliseconds after midnight.
It must annotate an `int64` that stores the number of
microseconds after midnight.
+`TIME` with precision `NANOS` is used for nanosecond precision.
+It must annotate an `int64` that stores the number of
+nanoseconds after midnight.
+
The sort order used for `TIME` is signed.
#### Deprecated time ConvertedType
@@ -305,7 +309,7 @@ with precision `MICROS`. Like the logical type counterpart,
it must annotate an
`TIMESTAMP` is used for a combined logical date and time type, with
millisecond or microsecond precision. The type has two type parameters:
-UTC adjustment (`true` or `false`) and precision (`MILLIS` or `MICROS`).
+UTC adjustment (`true` or `false`) and precision (`MILLIS` or `MICROS`,
`NANOS`).
`TIMESTAMP` with precision `MILLIS` is used for millisecond precision.
It must annotate an `int64` that stores the number of
@@ -315,6 +319,12 @@ milliseconds from the Unix epoch, 00:00:00.000 on 1
January 1970, UTC.
It must annotate an `int64` that stores the number of
microseconds from the Unix epoch, 00:00:00.000000 on 1 January 1970, UTC.
+`TIMESTAMP` with precision `NANOS` is used for nanosecond precision.
+It must annotate an `int64` that stores the number of
+nanoseconds from the Unix epoch, 00:00:00.000000000 on 1 January 1970, UTC.
+Valid values for nanosecond precision are between
+00:12:43 21 September 1677 UTC and 23:47:16 11 April 2262 UTC.
+
The sort order used for `TIMESTAMP` is signed.
#### Deprecated timestamp ConvertedType
diff --git a/src/main/thrift/parquet.thrift b/src/main/thrift/parquet.thrift
index 3b15cfef..6c9011b9 100644
--- a/src/main/thrift/parquet.thrift
+++ b/src/main/thrift/parquet.thrift
@@ -257,9 +257,11 @@ struct DecimalType {
/** Time units for logical types */
struct MilliSeconds {}
struct MicroSeconds {}
+struct NanoSeconds {}
union TimeUnit {
1: MilliSeconds MILLIS
2: MicroSeconds MICROS
+ 3: NanoSeconds NANOS
}
/**
@@ -275,7 +277,7 @@ struct TimestampType {
/**
* Time logical type annotation
*
- * Allowed for physical types: INT32 (millis), INT64 (micros)
+ * Allowed for physical types: INT32 (millis), INT64 (micros, nanos)
*/
struct TimeType {
1: required bool isAdjustedToUTC
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
> Nanosecond precision time and timestamp - parquet-format
> --------------------------------------------------------
>
> Key: PARQUET-1387
> URL: https://issues.apache.org/jira/browse/PARQUET-1387
> Project: Parquet
> Issue Type: Improvement
> Components: parquet-format
> Reporter: Nandor Kollar
> Assignee: Nandor Kollar
> Priority: Major
> Labels: pull-request-available
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)