[ https://issues.apache.org/jira/browse/ORC-87?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15984879#comment-15984879 ]
ASF GitHub Bot commented on ORC-87: ----------------------------------- 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? > [C++] Handle missing timezone conversion for timestamp statistics > ----------------------------------------------------------------- > > Key: ORC-87 > URL: https://issues.apache.org/jira/browse/ORC-87 > Project: ORC > Issue Type: Bug > Components: C++ > Reporter: Deepak Majeti > Assignee: Deepak Majeti > > The recent release adds timezone to timestamp values but does not add the > conversion for timestamp statistics. -- This message was sent by Atlassian JIRA (v6.3.15#6346)