orc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stiga-huang <...@git.apache.org>
Subject [GitHub] orc pull request #233: ORC-322: [C++] Fix writing & reading timestamp
Date Sat, 17 Mar 2018 12:35:26 GMT
Github user stiga-huang commented on a diff in the pull request:

    https://github.com/apache/orc/pull/233#discussion_r175256539
  
    --- Diff: c++/src/ColumnWriter.cc ---
    @@ -1194,12 +1194,11 @@ namespace orc {
         bool hasNull = false;
         for (uint64_t i = 0; i < numValues; ++i) {
           if (notNull == nullptr || notNull[i]) {
    -        // TimestampVectorBatch already stores data in UTC
    -        int64_t millsUTC = secs[i] * 1000 + nanos[i] / 1000000;
    +        int64_t millsUTC =
    +          (secs[i] + timezone.getVariant(secs[i]).gmtOffset) * 1000 + nanos[i] / 1000000;
    --- End diff --
    
    I think the original data in TimestampVectorBatch should still be UTC timestamps. So we
don't need the gmtOffset adjustment here.


---

Mime
View raw message