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 BCE5D200B49 for ; Wed, 20 Jul 2016 01:33:49 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id BB644160A8B; Tue, 19 Jul 2016 23:33:49 +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 35CBD160A76 for ; Wed, 20 Jul 2016 01:33:49 +0200 (CEST) Received: (qmail 23412 invoked by uid 500); 19 Jul 2016 23:33:48 -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 23401 invoked by uid 99); 19 Jul 2016 23:33:48 -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, 19 Jul 2016 23:33:48 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id F08C5E03A6; Tue, 19 Jul 2016 23:33:47 +0000 (UTC) From: omalley To: dev@orc.apache.org Reply-To: dev@orc.apache.org References: In-Reply-To: Subject: [GitHub] orc pull request #41: ORC-58: Move code for reading rows from Reader to RowR... Content-Type: text/plain Message-Id: <20160719233347.F08C5E03A6@git1-us-west.apache.org> Date: Tue, 19 Jul 2016 23:33:47 +0000 (UTC) archived-at: Tue, 19 Jul 2016 23:33:49 -0000 Github user omalley commented on a diff in the pull request: https://github.com/apache/orc/pull/41#discussion_r71443174 --- Diff: c++/src/Reader.cc --- @@ -1062,37 +1062,36 @@ namespace orc { // PASS } + RowReader::~RowReader() { + // PASS + } + static const uint64_t DIRECTORY_SIZE_GUESS = 16 * 1024; - class ReaderImpl : public Reader { + class ReaderImpl; + + class RowReaderImpl : public RowReader { private: const Timezone& localTimezone; // inputs - std::unique_ptr stream; - ReaderOptions options; - const uint64_t fileLength; - const uint64_t postscriptLength; std::vector selectedColumns; - + std::shared_ptr stream; --- End diff -- I'd suggest creating a single class that has all of the state for the ReaderImpl. Then it can have the postscript, InputStream, etc. and be shared between the ReaderImpl and the set of RowReaderImpls that share the same ReaderImpl. --- 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. ---