From dev-return-15647-archive-asf-public=cust-asf.ponee.io@arrow.apache.org Thu Oct 24 21:41:54 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 4B5FA18065D for ; Thu, 24 Oct 2019 23:41:54 +0200 (CEST) Received: (qmail 87167 invoked by uid 500); 24 Oct 2019 21:41:46 -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 86953 invoked by uid 99); 24 Oct 2019 21:41:45 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 24 Oct 2019 21:41:45 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id F26811A3218 for ; Thu, 24 Oct 2019 21:41:44 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-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: spamd2-us-west.apache.org (amavisd-new); dkim=pass (1024-bit key) header.d=cometmail.onmicrosoft.com Received: from mx1-ec2-va.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id C49iGt0_8m_R for ; Thu, 24 Oct 2019 21:41:43 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=40.107.78.47; helo=nam03-by2-obe.outbound.protection.outlook.com; envelope-from=omer@utdallas.edu; receiver= Received: from NAM03-BY2-obe.outbound.protection.outlook.com (mail-eopbgr780047.outbound.protection.outlook.com [40.107.78.47]) by mx1-ec2-va.apache.org (ASF Mail Server at mx1-ec2-va.apache.org) with ESMTPS id 3148BBC5BE for ; Thu, 24 Oct 2019 21:41:42 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=f4itf1zNiP46FOx+PhFGoKNpF+DLRIgeg7y9dfcX9bwWHZJiIKSsGDS0CKkkvQjwD4rrhwy5HZA5arjueqVFKmrKzPbMXt0oLXqzu4CjaY6LzjjaJjS9mlahk47p2b0Z2lHCjKe/Y2id34KuRY7eJwvcsTJhQkImAa3Xuf1BW0UND3OqU2ManxKOhTJjXiH+rThorKsoeaKYa/AHYBEWhJsCmxx2zJzXDOPun81ZJyl0DNR8X+V8aM7LDbaYDE95G/h7nl9NUpzPVWEi+UM+hvbwY1oAAz6Q1izq/vWYGZ/dORmINKZcVRQ/OcngGhdRo2TbrOHAzRfnNywMH7/8WA== 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=IboT3vTwupPOlbb5Wv8v+vkxeEBfhSxrD5asU9hoCrM=; b=mAfWCQ7LZPfDeiCipu5nQm7i0jaQyG/3RSvslS3gsb6s5QzSLNZEb64oicbuPeTy3aZwa0DGOn/kuWNp4mPKp4l9MA25iDjmwb1Tjvf0AkK0NRjAI00ClrEXrUM2J0nwCNj01oijun0pHCLuZbev0p0TQkBHkKt5/iOt5mGthQfFPZyUpnLqvByMzl0SKIUXpk+dYiQ6GOgxGhue7G8FKVoOOFq1lAsxNVJVyVx2kthu0d5u4Ki+11VIRrEXwYfI+7DCptOOHDQCbq9lZnrvIQdB4cpfHkrB+stEJcc4AL45ag1uDHluwPOxuZO4uVRNQOP2rGEmYTetJJhtV7S2Tg== 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=IboT3vTwupPOlbb5Wv8v+vkxeEBfhSxrD5asU9hoCrM=; b=G5Rc19U3DVZyA74YWgm9L1+AsPQy1lx81twzvoFAvpFN5TWH5q2IDRN6VwivNaKze55Ls/xTqbqjmaDyVhJVfXSBhRHeQ8AIwIsfd5PY8KqvZLSthWxESl+TyOmAbjjhD/7+NBQOMglpbuSdSZyWN/mRrsGejHmua/SeHvXIDSM= Received: from BYAPR01CA0014.prod.exchangelabs.com (2603:10b6:a02:80::27) by DM5PR01MB2697.prod.exchangelabs.com (2603:10b6:3:f3::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2387.22; Thu, 24 Oct 2019 21:41:35 +0000 Received: from CY1NAM02FT057.eop-nam02.prod.protection.outlook.com (2a01:111:f400:7e45::204) by BYAPR01CA0014.outlook.office365.com (2603:10b6:a02:80::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2387.20 via Frontend Transport; Thu, 24 Oct 2019 21:41:35 +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 CY1NAM02FT057.mail.protection.outlook.com (10.152.75.110) 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:41:34 +0000 Received: from mail-wm1-f49.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:41:34 -0500 Received: by mail-wm1-f49.google.com with SMTP id g24so4388691wmh.5 for ; Thu, 24 Oct 2019 14:41:34 -0700 (PDT) X-Gm-Message-State: APjAAAXKbyuuKLtgQzDUlIQ2tMX47tni9i1PqaTJ2F5PlwsrcLOVwB6i BzAX95HzCogMF4uvTPHVaqzbF4+nsZhh5sZ8d4U= X-Google-Smtp-Source: APXvYqyy4K40l3slLvfA9pCHjIV5gy/1mmEOswrb72h4+wNPQy4uV0KOwS19rOqc+TiGnu1cYdfGz/z1rNULv/MZDaQ= X-Received: by 2002:a05:600c:2488:: with SMTP id 8mr368640wms.31.1571953292618; Thu, 24 Oct 2019 14:41:32 -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:41:21 -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)(396003)(39860400002)(136003)(376002)(346002)(189003)(199004)(476003)(86362001)(6306002)(356004)(6666004)(50466002)(95326003)(316002)(42186006)(786003)(2906002)(47776003)(70586007)(11346002)(70206006)(446003)(61266001)(5660300002)(126002)(7736002)(336012)(81156014)(81166006)(8746002)(23676004)(1671002)(55446002)(109986005)(305945005)(5820100001)(26005)(386003)(75432002)(53546011)(8676002)(486006)(4326008)(966005)(478600001)(8936002)(498394004)(6246003)(3846002)(6116002)(186003)(229853002)(9686003)(88552002)(76176011);DIR:OUT;SFP:1101;SCL:1;SRVR:DM5PR01MB2697;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: 1f040f27-e5b2-43ac-e23f-08d758caf12e X-MS-TrafficTypeDiagnostic: DM5PR01MB2697: 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: QkJJi1AjZnhphNxRhJccBvsFPOLtNsGNa1NaDnIhUfmN1HYcxc3/OMQfBgaupscg5qwv4JgiBFv4WX9gO6TJLEKmrbuDQ9NZ5bFWY+fKGTGYgYYX1Q0rSZbpgk6izQiouVylAvz99ANZRMIionyC801LtlKAPn6ZwQEMdFdYfXd9wyt5mGlxXF02hw2+69jEInpBnhTbeADJibDpRTDE083DKB6FE9B30y4mHm4ckZDmLrpC1By1J1XQ9UxqLpMAoYiyXKFeI9n2RlMTYZySAaOnWREEEuLyTODhZhMZbVzzmHh7KzdyfJ9JgLUCTgRO4/gLckK/RQKCTDgch53gyZMOoj/Je+UQjemR5QR0CbqknWCn2zn6YAN0a9rNcLBJXsyHhkpYY9m2OZtHB50Vsfj0Le7wgfFl/hs3rI6REt3FZTkJWgSTFCjiRSjp5LSXsgjr4f4c7IaGrinpbS3HxlyzJYeYb6xjtzbGG/OKUCY= X-OriginatorOrg: utdallas.edu X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Oct 2019 21:41:34.8223 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 1f040f27-e5b2-43ac-e23f-08d758caf12e 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: DM5PR01MB2697 Forgot to mention most of those lines are longer than line width while out is usually (always?) last parameter, so probably that's why grep possibly underestimates their number. On Thu, Oct 24, 2019 at 4:33 PM Omer F. Ozarslan wrote: > > 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 w= rote: > > > > OK, it sounds like people want Result (at least in some circumstance= s). > > 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 |= sed > > 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 w= rote: > > > > > > > > > > > > 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 utilizin= g > > > > > Status. In some cases, Case 3 may be more usable Result-based, bu= t it > > > > > can also create more work (or confusion) on the part of the devel= oper, > > > > > either > > > > > > > > > > * The T in Result has to be a struct-like value that transport= s > > > > > multiple pieces of data > > > > > > > > The T can be a std::tuple though, so you need not necessarily defin= e a > > > > dedicated struct type for a single API's return value. > > > > > > > > > Can't say I'm thrilled about having Result or similar for = Case > > > > > 1-type functions (if I'm understanding what would be the solutio= n > > > > > there). > > > > > > > > Agreed. > > > > > > > > Regards > > > > > > > > Antoine. > > >