From commits-return-1348-archive-asf-public=cust-asf.ponee.io@parquet.apache.org Thu Jun 28 17:21:05 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 CF70118067C for ; Thu, 28 Jun 2018 17:21:04 +0200 (CEST) Received: (qmail 1142 invoked by uid 500); 28 Jun 2018 15:21:04 -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 1131 invoked by uid 99); 28 Jun 2018 15:21:03 -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:21:03 +0000 Received: by gitbox.apache.org (ASF Mail Server at gitbox.apache.org, from userid 33) id 5C00385088; Thu, 28 Jun 2018 15:21:03 +0000 (UTC) Date: Thu, 28 Jun 2018 15:21:03 +0000 To: "commits@parquet.apache.org" Subject: =?utf-8?q?=5Bparquet-cpp=5D_branch_master_updated=3A_PARQUET-134?= =?utf-8?q?0=3A_Fix_Travis_Ci_valgrind_errors_related_to_std=3A=3Arandom?= =?utf-8?b?X2Rl4oCm?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Message-ID: <153019926329.16088.15740156882451852753@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: d15d2687e9f154e69e956e2a56c8d1fd6c3b7ac8 X-Git-Newrev: be4c532139e9542fd42c4a65dc7928c512023582 X-Git-Rev: be4c532139e9542fd42c4a65dc7928c512023582 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 be4c532 PARQUET-1340: Fix Travis Ci valgrind errors related to std::random_de… be4c532 is described below commit be4c532139e9542fd42c4a65dc7928c512023582 Author: Deepak Majeti AuthorDate: Thu Jun 28 11:20:54 2018 -0400 PARQUET-1340: Fix Travis Ci valgrind errors related to std::random_de… …vice Followed fix from https://github.com/apache/arrow/pull/2039/files Author: Deepak Majeti Closes #473 from majetideepak/PARQUET-1340 and squashes the following commits: fcd6f2d [Deepak Majeti] add cast 7193d43 [Deepak Majeti] PARQUET-1340: Fix Travis Ci valgrind errors related to std::random_device --- src/parquet/util/test-common.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/parquet/util/test-common.h b/src/parquet/util/test-common.h index 22b748e..4e95870 100644 --- a/src/parquet/util/test-common.h +++ b/src/parquet/util/test-common.h @@ -18,6 +18,7 @@ #ifndef PARQUET_UTIL_TEST_COMMON_H #define PARQUET_UTIL_TEST_COMMON_H +#include #include #include #include @@ -101,8 +102,8 @@ static inline vector flip_coins_seed(int n, double p, uint32_t seed) { } static inline vector flip_coins(int n, double p) { - std::random_device rd; - std::mt19937 gen(rd()); + uint64_t seed = std::chrono::high_resolution_clock::now().time_since_epoch().count(); + std::mt19937 gen(static_cast(seed)); std::bernoulli_distribution d(p);