orc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From majetideepak <...@git.apache.org>
Subject [GitHub] orc issue #233: ORC-322: [C++] Fix writing & reading timestamp
Date Mon, 19 Mar 2018 17:59:52 GMT
Github user majetideepak commented on the issue:

    https://github.com/apache/orc/pull/233
  
    @wgtmac and @stiga-huang you are right that the C++ and Java writers must write the same
value to a file for a given input timestamp value. Looks like the Java side writes the timestamp
values provided as is in local time (no conversion) and writes the writer timezone in the
footer (however, stats are in UTC). We must do the same for the C++ writer as well if not
already.
    
    ORC-10 adds GMT offset when reading the values back. Therefore, the C++ reader always
returns values in UTC. The current behavior of ORC reader for timestamp values is the same
as SQL `TimestampTz`.
    To get the same values back ( aka SQL `Timestamp`), you need to convert the values read
back to local time.
    
    If you read a timestamp column from an ORC file and plan to write it immediately, you
must first convert the values to the local time before writing.


---

Mime
View raw message