[ https://issues.apache.org/jira/browse/ORC-87?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15983564#comment-15983564 ]
ASF GitHub Bot commented on ORC-87: ----------------------------------- Github user omalley commented on a diff in the pull request: https://github.com/apache/orc/pull/110#discussion_r113301215 --- 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 -- You need the timezone here too don't you? > [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)