Return-Path: X-Original-To: apmail-impala-dev-archive@minotaur.apache.org Delivered-To: apmail-impala-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 7B9C3195E5 for ; Sat, 16 Apr 2016 00:47:45 +0000 (UTC) Received: (qmail 72736 invoked by uid 500); 16 Apr 2016 00:47:45 -0000 Delivered-To: apmail-impala-dev-archive@impala.apache.org Received: (qmail 72695 invoked by uid 500); 16 Apr 2016 00:47:45 -0000 Mailing-List: contact dev-help@impala.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@impala.incubator.apache.org Delivered-To: mailing list dev@impala.incubator.apache.org Received: (qmail 72680 invoked by uid 99); 16 Apr 2016 00:47:45 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 16 Apr 2016 00:47:45 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 807BBC1589 for ; Sat, 16 Apr 2016 00:47:44 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.362 X-Spam-Level: X-Spam-Status: No, score=0.362 tagged_above=-999 required=6.31 tests=[RDNS_DYNAMIC=0.363, SPF_PASS=-0.001] autolearn=disabled Received: from mx2-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id Vv6Dlt74dyKc for ; Sat, 16 Apr 2016 00:47:42 +0000 (UTC) Received: from ip-10-146-233-104.ec2.internal (ec2-75-101-130-251.compute-1.amazonaws.com [75.101.130.251]) by mx2-lw-eu.apache.org (ASF Mail Server at mx2-lw-eu.apache.org) with ESMTPS id F37565F571 for ; Sat, 16 Apr 2016 00:47:41 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by ip-10-146-233-104.ec2.internal (8.14.4/8.14.4) with ESMTP id u3G0lec3017857; Sat, 16 Apr 2016 00:47:40 GMT Message-Id: <201604160047.u3G0lec3017857@ip-10-146-233-104.ec2.internal> Date: Sat, 16 Apr 2016 00:47:40 +0000 From: "Matthew Jacobs (Code Review)" To: Thomas Tauber-Marshall , impala-cr@cloudera.com, dev@impala.incubator.apache.org CC: Marcel Kornacker , Wes McKinney Reply-To: mj@cloudera.com X-Gerrit-MessageType: comment Subject: =?UTF-8?Q?[hs2client-CR]_Initial_structure_for_the_C++_hiveserver2_client.=0A?= X-Gerrit-Change-Id: I7be82d5897ad6093116915b17924674c4ae508a0 X-Gerrit-ChangeURL: X-Gerrit-Commit: 1208665568294eb6aa6e7305b7e60155b35bc409 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Content-Disposition: inline User-Agent: Gerrit/2.10-rc0 Matthew Jacobs has posted comments on this change. Change subject: Initial structure for the C++ hiveserver2 client. ...................................................................... Patch Set 3: (1 comment) Just responding to a comment on patch set 3. I'll review the new patch set later. http://gerrit.cloudera.org:8080/#/c/2645/3/src/hs2client/sample-usage.cc File src/hs2client/sample-usage.cc: Line 26: CHECK_OK > Defining macros for checking statuses like this is fairly common practice, Yeah, we do often use macros for things like verifying status objects but typically macros are best to avoid unless there's a good reason to use them. RETURN_IF_ERROR() is kind of a useful macro due to it actually returning control flow from the current function on an error (consider the alternative). However, something like EXIT_IF_ERROR (which is basically what you have here) isn't really providing much beyond what a similar function is since the control flow at the point of calling it doesn't need to branch differently. Then I think we typically only really provide EXIT_IF_ERROR to be consistent with RETURN_IF_ERROR, but we don't have those here so it feels out of place. If anything though, macro code is very error prone and hard to read. Anything that compromises readability should be avoided unless there's a good reason to do so :) -- To view, visit http://gerrit.cloudera.org:8080/2645 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: comment Gerrit-Change-Id: I7be82d5897ad6093116915b17924674c4ae508a0 Gerrit-PatchSet: 3 Gerrit-Project: hs2client Gerrit-Branch: master Gerrit-Owner: Thomas Tauber-Marshall Gerrit-Reviewer: Marcel Kornacker Gerrit-Reviewer: Matthew Jacobs Gerrit-Reviewer: Thomas Tauber-Marshall Gerrit-Reviewer: Wes McKinney Gerrit-HasComments: Yes