From user-return-1263-archive-asf-public=cust-asf.ponee.io@arrow.apache.org Tue Jun 8 13:05:21 2021 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mxout1-he-de.apache.org (mxout1-he-de.apache.org [95.216.194.37]) by mx-eu-01.ponee.io (Postfix) with ESMTPS id 69DF518068A for ; Tue, 8 Jun 2021 15:05:21 +0200 (CEST) Received: from mail.apache.org (mailroute1-lw-us.apache.org [207.244.88.153]) by mxout1-he-de.apache.org (ASF Mail Server at mxout1-he-de.apache.org) with SMTP id D64676186F for ; Tue, 8 Jun 2021 13:04:26 +0000 (UTC) Received: (qmail 25479 invoked by uid 500); 8 Jun 2021 13:03:39 -0000 Mailing-List: contact user-help@arrow.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@arrow.apache.org Delivered-To: mailing list user@arrow.apache.org Received: (qmail 24362 invoked by uid 99); 8 Jun 2021 13:01:11 -0000 Received: from spamproc1-he-de.apache.org (HELO spamproc1-he-de.apache.org) (116.203.196.100) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 08 Jun 2021 13:01:11 +0000 Received: from localhost (localhost [127.0.0.1]) by spamproc1-he-de.apache.org (ASF Mail Server at spamproc1-he-de.apache.org) with ESMTP id 9BAC71FF495 for ; Tue, 8 Jun 2021 13:01:06 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamproc1-he-de.apache.org X-Spam-Flag: NO X-Spam-Score: 0.25 X-Spam-Level: X-Spam-Status: No, score=0.25 tagged_above=-999 required=6.31 tests=[HEADER_FROM_DIFFERENT_DOMAINS=0.25, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=disabled Received: from mx1-ec2-va.apache.org ([116.203.227.195]) by localhost (spamproc1-he-de.apache.org [116.203.196.100]) (amavisd-new, port 10024) with ESMTP id vUDqACj-7VDb for ; Tue, 8 Jun 2021 13:01:04 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=116.202.254.214; helo=ciao.gmane.io; envelope-from=gcaau-arrow-user@m.gmane-mx.org; receiver= Received: from ciao.gmane.io (ciao.gmane.io [116.202.254.214]) by mx1-ec2-va.apache.org (ASF Mail Server at mx1-ec2-va.apache.org) with ESMTPS id D098FBD223 for ; Tue, 8 Jun 2021 13:01:03 +0000 (UTC) Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1lqbLl-0008cw-5y for user@arrow.apache.org; Tue, 08 Jun 2021 15:00:57 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: user@arrow.apache.org From: Antoine Pitrou Subject: Re: C++ ARROW_DEPRECATED Use MemoryPool-less variant Date: Tue, 8 Jun 2021 15:00:49 +0200 Message-ID: <20210608150049.1e9df9f4@fsol> References: Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Newsreader: Claws Mail 3.17.5 (GTK+ 2.24.32; x86_64-pc-linux-gnu) On Tue, 8 Jun 2021 12:32:23 +0000 "Weber, Eugene" wrote: > > When I compile example.cc under cpp/examples/minimal_build I get a depreciation warning on: > > arrow::csv::TableReader::Make(arrow::default_memory_pool(), > arrow::io::default_io_context(), > input_file, > arrow::csv::ReadOptions::Defaults(), > arrow::csv::ParseOptions::Defaults(), > arrow::csv::ConvertOptions::Defaults())); > > The deprecation code in reader.h is: > > ARROW_DEPRECATED("Use MemoryPool-less variant (the IOContext holds a pool already)") > static Result> Make( > MemoryPool* pool, io::IOContext io_context, std::shared_ptr input, > const ReadOptions&, const ParseOptions&, const ConvertOptions&); > > I've read the documentation on MemoryPool, but I'm still not fully understanding the relationship between TableReader and MemoryPool, or how exactly to correct the example code. I understand that the CVS table is read into a table structure in memory allocated from the memory pool. I'm not understanding the meaning of "Use MemoryPool-less variant (the IOContext holds a pool already)". What it means is that you don't need to pass a memory pool explicitly, since the IOContext parameter already has a memory pool inside. That said, it seems the example code should be updated for the newer API. Thanks for noticing this. Regards Antoine.