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?
---
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.
---