From dev-return-15646-archive-asf-public=cust-asf.ponee.io@arrow.apache.org Thu Oct 24 21:34:23 2019 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 [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id 96EBC18065D for ; Thu, 24 Oct 2019 23:34:23 +0200 (CEST) Received: (qmail 74214 invoked by uid 500); 24 Oct 2019 21:34:22 -0000 Mailing-List: contact dev-help@arrow.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@arrow.apache.org Delivered-To: mailing list dev@arrow.apache.org Received: (qmail 74202 invoked by uid 99); 24 Oct 2019 21:34:21 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 24 Oct 2019 21:34:21 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 2A6D6C1431 for ; Thu, 24 Oct 2019 21:34:21 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.206 X-Spam-Level: * X-Spam-Status: No, score=1.206 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, MISSING_HEADERS=1.207, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=disabled Authentication-Results: spamd4-us-west.apache.org (amavisd-new); dkim=pass (1024-bit key) header.d=cometmail.onmicrosoft.com Received: from mx1-he-de.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id LZj-HBFIh_RC for ; Thu, 24 Oct 2019 21:34:19 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=40.107.79.78; helo=nam03-co1-obe.outbound.protection.outlook.com; envelope-from=omer@utdallas.edu; receiver= Received: from NAM03-CO1-obe.outbound.protection.outlook.com (mail-eopbgr790078.outbound.protection.outlook.com [40.107.79.78]) by mx1-he-de.apache.org (ASF Mail Server at mx1-he-de.apache.org) with ESMTPS id 813AD7E17D for ; Thu, 24 Oct 2019 21:34:18 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=eBcuWmGQedQsgOa6W4ccRKSzK+I44O4LAZGqJVoc/yBCaGV3xXWUxeCduURV9IWUY/B35BEg/TTurYT6Xf3pQfQJ1V9vNcAiGcMfiKSKX1985Wf5vEOd9izD4NspPsSUOoupis6pOHn4AIdqE7KkzgDs28HJfXjFb4Np5RpdL/vqgJBPK4f7aod67hG8ms8aHPhQ0aYSWJSjciCohMYJPnuzDKO5zIdgdIXhVwsuf7vQn5tghQ5PE0i4P/NJa0I65VSWETnTSCoI/hJm5+f2gtaOVwxdj24XgQsxYlVeRGkrDY2x2gBQE7+DPCm5aJX3D3DfKCvXAzTEWBfGOH3n6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=e6EEIrkFdzp7L4BxShP0dgmebL4kmT9qElNIumFkKr0=; b=PcczA5pSUPjdasQ7evM813f4aw2KElTQf+HsscoWC4ES0QZTke+Xwk5Ibh4XD+uTvi9tIMk9zzCwtDBy6FzKBEqnif4oHzGDXG63/CezTcOsvmIxJpe7CPGFbBsUfndU4T1OQahBQ5m31M1AiCay7ii9OwUG+YxlcgfaonQWbk4I5nUOVNTBiKgnF5gMtLUJALgwN4iK4MvKx7CEKcM+bicN1SY2tiiYXYVQONsMa879xSQVwnRHwgdQpzjMcMM5apAwQvx8pge/sSJmQ+7Wk3kwohYieb50TRz6wewERGauFUrR1g/prOYEuedG2+9gCz+P0xpw1n1EGqQL5Ca3AQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=neutral (sender ip is 129.110.242.146) smtp.rcpttodomain=arrow.apache.org smtp.mailfrom=utdallas.edu; dmarc=fail (p=none sp=none pct=100) action=none header.from=utdallas.edu; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cometmail.onmicrosoft.com; s=selector2-cometmail-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=e6EEIrkFdzp7L4BxShP0dgmebL4kmT9qElNIumFkKr0=; b=dHBWaIagJtBu7QK2RPCAONO2U4X9gcowva6/28i1qYObdAxipZsj7l/NeBJ9X1qeo7diF0Dtoitgx72baKAF56NnrgxkxioNhoTaPBPOiygVYah2YDm3qAp88yCHhbYFeHWEB8Zoq1E1LUfkt+fYHWazdaelN5uSIQWjkLOqH+g= Received: from MWHPR01CA0030.prod.exchangelabs.com (2603:10b6:300:101::16) by BN6PR01MB2692.prod.exchangelabs.com (2603:10b6:404:ce::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2387.20; Thu, 24 Oct 2019 21:34:08 +0000 Received: from SN1NAM02FT048.eop-nam02.prod.protection.outlook.com (2a01:111:f400:7e44::206) by MWHPR01CA0030.outlook.office365.com (2603:10b6:300:101::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.2387.22 via Frontend Transport; Thu, 24 Oct 2019 21:34:08 +0000 Authentication-Results: spf=neutral (sender IP is 129.110.242.146) smtp.mailfrom=utdallas.edu; arrow.apache.org; dkim=none (message not signed) header.d=none;arrow.apache.org; dmarc=fail action=none header.from=utdallas.edu; Received-SPF: Neutral (protection.outlook.com: 129.110.242.146 is neither permitted nor denied by domain of utdallas.edu) Received: from webmail.utdallas.edu (129.110.242.146) by SN1NAM02FT048.mail.protection.outlook.com (10.152.72.202) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.2387.20 via Frontend Transport; Thu, 24 Oct 2019 21:34:08 +0000 Received: from mail-wm1-f54.google.com (10.182.70.130) by utdex02.campus.ad.utdallas.edu (10.182.71.121) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Thu, 24 Oct 2019 16:34:07 -0500 Received: by mail-wm1-f54.google.com with SMTP id v3so2856373wmh.1 for ; Thu, 24 Oct 2019 14:34:07 -0700 (PDT) X-Gm-Message-State: APjAAAXCX8Ss79iN4tkEF4j6Mvbf5D/qxwqUBqMTkBhSnCMbAzCq4ApN 1J0a7InmqzjQZjQB+Y2vu466lI+sAG2BaRMUCpY= X-Google-Smtp-Source: APXvYqxfB8X1Ei9OIbhUDhApqqf4t2+GISn6dDhtQ+AXlwjy4FdCJa22N55fIehjHAWYi2yWJ4z6v465sirx9YqK9Tw= X-Received: by 2002:a05:600c:2488:: with SMTP id 8mr350104wms.31.1571952846090; Thu, 24 Oct 2019 14:34:06 -0700 (PDT) MIME-Version: 1.0 References: <5d8a8aa2-0c36-3e37-a4df-2663d4505389@python.org> <21183bb1-813f-b35b-b391-3f52ef2e62c9@python.org> <20191005.204934.1720707226652785828.kou@clear-code.com> <49ec24e1-a7c2-4b31-9217-582bd3d2dc2e@python.org> In-Reply-To: From: "Omer F. Ozarslan" Date: Thu, 24 Oct 2019 16:33:55 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [DISCUSS] Result vs Status CC: dev Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Originating-IP: [10.182.70.130] X-ClientProxiedBy: utdex01.campus.ad.utdallas.edu (10.182.71.117) To utdex02.campus.ad.utdallas.edu (10.182.71.121) X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:129.110.242.146;IPV:NLI;CTRY:US;EFV:NLI;SFV:NSPM;SFS:(10009020)(4636009)(346002)(39860400002)(376002)(136003)(396003)(189003)(199004)(81166006)(8676002)(81156014)(50466002)(88552002)(95326003)(966005)(3846002)(5660300002)(6116002)(336012)(229853002)(47776003)(478600001)(8746002)(61266001)(70586007)(42186006)(316002)(786003)(70206006)(8936002)(6246003)(7736002)(305945005)(6666004)(109986005)(86362001)(356004)(53546011)(386003)(4326008)(498394004)(446003)(6306002)(26005)(5820100001)(486006)(75432002)(126002)(476003)(11346002)(76176011)(55446002)(186003)(1671002)(23676004)(2906002)(9686003);DIR:OUT;SFP:1101;SCL:1;SRVR:BN6PR01MB2692;H:webmail.utdallas.edu;FPR:;SPF:Neutral;LANG:en;PTR:InfoDomainNonexistent;MX:1;A:1; X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 57090227-26f7-41e2-f505-08d758c9e6fb X-MS-TrafficTypeDiagnostic: BN6PR01MB2692: X-MS-Exchange-PUrlCount: 1 X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:10000; X-Forefront-PRVS: 0200DDA8BE X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: CqR+2tyRhy54MW8Df+oGcvGfukmTBn20HfCSHXEZJbidAvLi2W1IthLslZKRILZXZ9yMCcEIcPmZ5Q0Lz6TFIU6HnWcVyQXJ7hlY4Ano1xjp9nCNc+D/doFeTdp93RbEEq3TgI9gZRLwU/oWMIDzFISYxFCDSD7debhFYlCK9qswwMISmg52rSDzOq8bhEr/ce8QlZoqE8GI9e7wbIBZXAl65zV/JjQxhFVodyyL0Ns4vfvoN8KAaBiTBGM8iHX07FibOkCd6dqdq5cwMNXjiSiH1O1WQZ3p0+wiJ9TaD7c+m8bwj9/2RZ0SKmBJqOE0gM+wuHT4m6BtsRaTMTXKOrggtBlPpZ8wFdzUP8sTwyyxBuRHX0dNlwW7afbZJamYTjTa4mcztb9Npjbr60RP6Tr3mMHrY1PLzlrHDUN7AD+5TbL/MiDpW1iZ+9tCCJd06RsVu1auh0jr4Bwn7ZclxUPA/2FakzlkVh1JeO3TsaE= X-OriginatorOrg: utdallas.edu X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Oct 2019 21:34:08.2396 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 57090227-26f7-41e2-f505-08d758c9e6fb X-MS-Exchange-CrossTenant-Id: 8d281d1d-9c4d-4bf7-b16e-032d15de9f6c X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=8d281d1d-9c4d-4bf7-b16e-032d15de9f6c;Ip=[129.110.242.146];Helo=[webmail.utdallas.edu] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR01MB2692 Hi, I don't have much experience on customized clang-tidy plugins, but this might be a good use case for such a plugin from what I read here and there (frankly this was a good excuse for me to have a look at clang tooling as well). I wanted to ensure it isn't obviously overkill before this suggestion: Running a clang query which lists functions returning `arrow::Status` and taking a pointer parameter named `out` showed that there are 13947 such functions in `cpp/src/**/*.h`. [1] I checked logs and it seemed legitimate to me, but please check it in case I missed something. If that's the case, it might be tedious to do this work manually. [1]: https://gist.github.com/ozars/ecbb1b8acd4a57ba4721c1965f83f342 (Note that the log file is shown as truncated by github after ~30k lines) Best, Omer On Wed, Oct 23, 2019 at 9:23 PM Micah Kornfield wro= te: > > OK, it sounds like people want Result (at least in some circumstances)= . > Any thoughts on migrating old APIs and what to do for new APIs going > forward? > > A very rough approximation [1] yields the following counts by module: > > 853 arrow > > 17 gandiva > > 25 parquet > > 50 plasma > > > > [1] grep -r Status cpp/src/* |grep ".h:" | grep "\\*" |grep -v Accept |se= d > s/:.*// | cut -f3 -d/ |sort > > > Thanks, > > Micah > > > > On Sat, Oct 19, 2019 at 7:50 PM Francois Saint-Jacques < > fsaintjacques@gmail.com> wrote: > > > As mentioned, Result is an improvement for function which returns a > > single value, e.g. Make/Factory-like. My vote goes Result for such > > case. For multiple return types, we have std::tuple like Antoine > > proposed. > > > > Fran=C3=A7ois > > > > On Fri, Oct 18, 2019 at 9:19 PM Antoine Pitrou wro= te: > > > > > > > > > Le 18/10/2019 =C3=A0 20:58, Wes McKinney a =C3=A9crit : > > > > I'm definitely uncomfortable with the idea of deprecating Status. > > > > > > > > We have a few kinds of functions that can fail: > > > > > > > > 1. Functions with no "out" arguments > > > > 2. Functions with one out argument > > > > 3. Functions with multiple out arguments > > > > > > > > IMHO functions in category 2 are the best candidates for utilizing > > > > Status. In some cases, Case 3 may be more usable Result-based, but = it > > > > can also create more work (or confusion) on the part of the develop= er, > > > > either > > > > > > > > * The T in Result has to be a struct-like value that transports > > > > multiple pieces of data > > > > > > The T can be a std::tuple though, so you need not necessarily define = a > > > dedicated struct type for a single API's return value. > > > > > > > Can't say I'm thrilled about having Result or similar for Ca= se > > > > 1-type functions (if I'm understanding what would be the solution > > > > there). > > > > > > Agreed. > > > > > > Regards > > > > > > Antoine. > >