orc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From majetideepak <...@git.apache.org>
Subject [GitHub] orc pull request #116: ORC-185: [C++] Simplify Statististics Implementation
Date Wed, 03 May 2017 14:25:28 GMT
Github user majetideepak commented on a diff in the pull request:

    https://github.com/apache/orc/pull/116#discussion_r114558026
  
    --- Diff: c++/src/Statistics.hh ---
    @@ -41,49 +41,181 @@ namespace orc {
       };
     
     /**
    + * Internal Statistics Implementation
    + */
    +
    +  template <typename T>
    +  class InternalStatisticsImpl {
    +  private:
    +    bool hasNull_;
    +    bool hasMinimum_;
    +    bool hasMaximum_;
    +    bool hasSum_;
    +    bool hasTotalLength_;
    +    uint64_t totalLength_;
    +    uint64_t valueCount_;
    +    T minimum_;
    +    T maximum_;
    +    T sum_;
    +  public:
    +    InternalStatisticsImpl() {
    +      hasNull_ = false;
    +      hasMinimum_ = false;
    +      hasMaximum_ = false;
    +      hasSum_ = false;
    +      hasTotalLength_ = false;
    +      totalLength_ = -1;
    --- End diff --
    
    Will make this change. However, we have to initialize the first value using `setMinimum(),
setMinimum()` for min, max fields. We could use the update methods from the second value being
written.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message