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

    https://github.com/apache/orc/pull/110#discussion_r113300916
  
    --- Diff: c++/src/Statistics.cc ---
    @@ -279,20 +277,28 @@ namespace orc {
       }
     
       TimestampColumnStatisticsImpl::TimestampColumnStatisticsImpl
    -  (const proto::ColumnStatistics& pb, bool correctStats) {
    +  (const proto::ColumnStatistics& pb, const StatContext& statContext) {
         valueCount = pb.numberofvalues();
    -    if (!pb.has_timestampstatistics() || !correctStats) {
    +    if (!pb.has_timestampstatistics() || !statContext.correctStats) {
           _hasMinimum = false;
           _hasMaximum = false;
           minimum = 0;
           maximum = 0;
         }else{
           const proto::TimestampStatistics& stats = pb.timestampstatistics();
    -      _hasMinimum = stats.has_minimum();
    -      _hasMaximum = stats.has_maximum();
    -
    -      minimum = stats.minimum();
    -      maximum = stats.maximum();
    +      _hasMinimum = stats.has_minimumutc() || (stats.has_minimum() && 
statContext.writerTimezone);
    +      _hasMaximum = stats.has_maximumutc() || (stats.has_maximum() && 
statContext.writerTimezone);
    +
    +      if (stats.has_minimumutc()) {
    +        minimum = stats.minimumutc();
    +      } else {
    +        minimum = stats.minimum() + statContext.writerTimezone->getEpoch();
    +      }
    +      if (stats.has_minimumutc()) {
    --- End diff --
    
    You mean has_maximumutc() here.


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