Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 2D2FB200CA4 for ; Wed, 3 May 2017 01:14:11 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 2BD56160B9D; Tue, 2 May 2017 23:14:11 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 98F8D160BAC for ; Wed, 3 May 2017 01:14:10 +0200 (CEST) Received: (qmail 87430 invoked by uid 500); 2 May 2017 23:14:09 -0000 Mailing-List: contact dev-help@orc.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@orc.apache.org Delivered-To: mailing list dev@orc.apache.org Received: (qmail 87416 invoked by uid 99); 2 May 2017 23:14:09 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 May 2017 23:14:09 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 71EB0DFBC7; Tue, 2 May 2017 23:14:09 +0000 (UTC) From: wgtmac To: dev@orc.apache.org Reply-To: dev@orc.apache.org References: In-Reply-To: Subject: [GitHub] orc pull request #116: ORC-185: [C++] Simplify Statististics Implementation Content-Type: text/plain Message-Id: <20170502231409.71EB0DFBC7@git1-us-west.apache.org> Date: Tue, 2 May 2017 23:14:09 +0000 (UTC) archived-at: Tue, 02 May 2017 23:14:11 -0000 Github user wgtmac commented on a diff in the pull request: https://github.com/apache/orc/pull/116#discussion_r114446720 --- Diff: c++/src/Statistics.hh --- @@ -41,49 +41,181 @@ namespace orc { }; /** + * Internal Statistics Implementation + */ + + template --- End diff -- We may need some functions like void increase(uint64 count) to increase valueCount. I can add them when needed. My main concern for using templates is that we need to compare, update, merge ColumnStatistics, and transform to protobuf version for implementing writers and using templates will also introduce some duplicate code. It means we still need to do template specialization for different types like Date, Timestamp, Decimal, etc. if we want to let class ColumnStatistics to handle the update (e.g. use ColumnStatistics::update(T value) to update min/max for type T). Otherwise we may need to let specific ColumnWriters to be responsible for update (e.g. DecimalColumnWriter to compare min/max of decimal values and then use setMax/setMin of ColumnStatistics to update the values). --- 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. ---