From commits-return-1349-archive-asf-public=cust-asf.ponee.io@parquet.apache.org Thu Jun 28 17:23:34 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 47591180662 for ; Thu, 28 Jun 2018 17:23:34 +0200 (CEST) Received: (qmail 14248 invoked by uid 500); 28 Jun 2018 15:23:33 -0000 Mailing-List: contact commits-help@parquet.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@parquet.apache.org Delivered-To: mailing list commits@parquet.apache.org Received: (qmail 14239 invoked by uid 99); 28 Jun 2018 15:23:33 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 28 Jun 2018 15:23:33 +0000 Received: by gitbox.apache.org (ASF Mail Server at gitbox.apache.org, from userid 33) id CA32E85088; Thu, 28 Jun 2018 15:23:32 +0000 (UTC) Date: Thu, 28 Jun 2018 15:23:32 +0000 To: "commits@parquet.apache.org" Subject: [parquet-cpp] branch master updated: PARQUET-1334: [C++] memory_map parameter seems missleading in parquet file opener MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Message-ID: <153019941274.17046.9852896668467734769@gitbox.apache.org> From: mdeepak@apache.org X-Git-Host: gitbox.apache.org X-Git-Repo: parquet-cpp X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Oldrev: be4c532139e9542fd42c4a65dc7928c512023582 X-Git-Newrev: ac5bd8247f6adf8a674a52938c172ab72d1450b2 X-Git-Rev: ac5bd8247f6adf8a674a52938c172ab72d1450b2 X-Git-NotificationType: ref_changed_plus_diff X-Git-Multimail-Version: 1.5.dev Auto-Submitted: auto-generated This is an automated email from the ASF dual-hosted git repository. mdeepak pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/parquet-cpp.git The following commit(s) were added to refs/heads/master by this push: new ac5bd82 PARQUET-1334: [C++] memory_map parameter seems missleading in parquet file opener ac5bd82 is described below commit ac5bd8247f6adf8a674a52938c172ab72d1450b2 Author: Philipp Hoch AuthorDate: Thu Jun 28 11:23:24 2018 -0400 PARQUET-1334: [C++] memory_map parameter seems missleading in parquet file opener If memory_map parameter is true, normal file operation is executed, while in negative case, the according memory mapped file operation happens. Seems either be used via inverted logic or being bug. Author: Philipp Hoch Closes #471 from philhoch/bugfix-mixed-up-memory-map-parameter and squashes the following commits: 651cf6b [Philipp Hoch] switched logic within conditional to support memory mapped behavior if requested and readable file accordingly --- src/parquet/file_reader.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/parquet/file_reader.cc b/src/parquet/file_reader.cc index 0632872..ae1c0a7 100644 --- a/src/parquet/file_reader.cc +++ b/src/parquet/file_reader.cc @@ -273,14 +273,14 @@ std::unique_ptr ParquetFileReader::OpenFile( const std::shared_ptr& metadata) { std::shared_ptr<::arrow::io::ReadableFileInterface> source; if (memory_map) { - std::shared_ptr<::arrow::io::ReadableFile> handle; + std::shared_ptr<::arrow::io::MemoryMappedFile> handle; PARQUET_THROW_NOT_OK( - ::arrow::io::ReadableFile::Open(path, props.memory_pool(), &handle)); + ::arrow::io::MemoryMappedFile::Open(path, ::arrow::io::FileMode::READ, &handle)); source = handle; } else { - std::shared_ptr<::arrow::io::MemoryMappedFile> handle; + std::shared_ptr<::arrow::io::ReadableFile> handle; PARQUET_THROW_NOT_OK( - ::arrow::io::MemoryMappedFile::Open(path, ::arrow::io::FileMode::READ, &handle)); + ::arrow::io::ReadableFile::Open(path, props.memory_pool(), &handle)); source = handle; }