Github user majetideepak commented on a diff in the pull request:

    https://github.com/apache/orc/pull/110#discussion_r113462343
  
    --- Diff: c++/src/Reader.cc ---
    @@ -526,16 +526,25 @@ namespace orc {
         if (metadata.get() == nullptr) {
           throw std::logic_error("No stripe statistics in file");
         }
    +    auto currentStripeInfo = 
footer->stripes(static_cast<int>(stripeIndex));
    +    auto currentStripeFooter = getStripeFooter(currentStripeInfo, 
*contents.get());
    +    const Timezone& writerTZ =
    +      currentStripeFooter.has_writertimezone() ?
    +        getTimezoneByName(currentStripeFooter.writertimezone()) :
    +        getLocalTimezone();
    +    StatContext statContext;
    +    statContext.correctStats = hasCorrectStatistics();
    +    statContext.writerTimezone = &writerTZ;
         return std::unique_ptr<Statistics>
           (new StatisticsImpl(metadata->stripestats
    -                          (static_cast<int>(stripeIndex)),
    -                          hasCorrectStatistics()));
    +                          (static_cast<int>(stripeIndex)), statContext));
       }
     
       std::unique_ptr<Statistics> ReaderImpl::getStatistics() const {
    +    StatContext statContext;
    +    statContext.correctStats = hasCorrectStatistics();
    --- End diff --
    
    `getStatistics()` is returning the statistics in the file footer. As far as 
I understood, there is no timezone information available in the file footer. 
Looks like the timezone is stored for each stripe.
    I am also curious about this design choice. I would imagine the file footer 
to have the timezone information. Is it possible for different stripes to have 
different timezone values?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to