This is an automated email from the ASF dual-hosted git repository.

omalley pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/orc.git


The following commit(s) were added to refs/heads/master by this push:
     new 280cb5a  ORC-434: Fix incorrect documentation for Date/Timestamp 
ColumnStatistics
280cb5a is described below

commit 280cb5a6a6122ad79d04dc5ca9c76b2281f6153a
Author: Gang Wu <[email protected]>
AuthorDate: Thu Nov 8 14:41:50 2018 -0800

    ORC-434: Fix incorrect documentation for Date/Timestamp ColumnStatistics
    
    Fixes #337
    
    Signed-off-by: Owen O'Malley <[email protected]>
---
 site/specification/ORCv0.md |  2 +-
 site/specification/ORCv1.md | 10 ++++++++--
 site/specification/ORCv2.md |  9 +++++++--
 3 files changed, 16 insertions(+), 5 deletions(-)

diff --git a/site/specification/ORCv0.md b/site/specification/ORCv0.md
index b4fea4e..613298a 100644
--- a/site/specification/ORCv0.md
+++ b/site/specification/ORCv0.md
@@ -297,7 +297,7 @@ message DecimalStatistics {
 ```
 
 Date columns record the minimum and maximum values as the number of
-days since the epoch (1/1/2015).
+days since the UNIX epoch (1/1/1970 in UTC).
 
 ```
 message DateStatistics {
diff --git a/site/specification/ORCv1.md b/site/specification/ORCv1.md
index 5dbd3d0..7835080 100644
--- a/site/specification/ORCv1.md
+++ b/site/specification/ORCv1.md
@@ -297,7 +297,7 @@ message DecimalStatistics {
 ```
 
 Date columns record the minimum and maximum values as the number of
-days since the epoch (1/1/2015).
+days since the UNIX epoch (1/1/1970 in UTC).
 
 ```
 message DateStatistics {
@@ -308,13 +308,19 @@ message DateStatistics {
 ```
 
 Timestamp columns record the minimum and maximum values as the number of
-milliseconds since the epoch (1/1/2015).
+milliseconds since the UNIX epoch (1/1/1970 00:00:00). Before ORC-135, the
+local timezone offset was included and they were stored as `minimum` and
+`maximum`. After ORC-135, the timestamp is adjusted to UTC before being
+converted to milliseconds and stored in `minimumUtc` and `maximumUtc`.
 
 ```
 message TimestampStatistics {
  // min,max values saved as milliseconds since epoch
  optional sint64 minimum = 1;
  optional sint64 maximum = 2;
+ // min,max values saved as milliseconds since UNIX epoch
+ optional sint64 minimumUtc = 3;
+ optional sint64 maximumUtc = 4;
 }
 ```
 
diff --git a/site/specification/ORCv2.md b/site/specification/ORCv2.md
index d91139c..79f930e 100644
--- a/site/specification/ORCv2.md
+++ b/site/specification/ORCv2.md
@@ -317,7 +317,7 @@ message DecimalStatistics {
 ```
 
 Date columns record the minimum and maximum values as the number of
-days since the epoch (1/1/2015).
+days since the UNIX epoch (1/1/1970 in UTC).
 
 ```
 message DateStatistics {
@@ -328,13 +328,18 @@ message DateStatistics {
 ```
 
 Timestamp columns record the minimum and maximum values as the number of
-milliseconds since the epoch (1/1/2015).
+milliseconds since the UNIX epoch (1/1/1970 00:00:00). The timestamp is
+adjusted to UTC before being converted to milliseconds and stored in
+`minimumUtc` and `maximumUtc`.
 
 ```
 message TimestampStatistics {
  // min,max values saved as milliseconds since epoch
  optional sint64 minimum = 1;
  optional sint64 maximum = 2;
+ // min,max values saved as milliseconds since UNIX epoch
+ optional sint64 minimumUtc = 3;
+ optional sint64 maximumUtc = 4;
 }
 ```
 

Reply via email to