Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 1C903200BB9 for ; Mon, 24 Oct 2016 07:16:52 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 1B32F160AFD; Mon, 24 Oct 2016 05:16:52 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 6276A160AFC for ; Mon, 24 Oct 2016 07:16:51 +0200 (CEST) Received: (qmail 59068 invoked by uid 500); 24 Oct 2016 05:16:50 -0000 Mailing-List: contact reviews-help@impala.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list reviews@impala.incubator.apache.org Received: (qmail 59050 invoked by uid 99); 24 Oct 2016 05:16:50 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 24 Oct 2016 05:16:50 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 999E41806F7 for ; Mon, 24 Oct 2016 05:16:49 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-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 mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id 6DMbH5qPYXPG for ; Mon, 24 Oct 2016 05:16:47 +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 mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id 47FB55F3A1 for ; Mon, 24 Oct 2016 05:16:47 +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 u9O5GksE018824; Mon, 24 Oct 2016 05:16:46 GMT Message-Id: <201610240516.u9O5GksE018824@ip-10-146-233-104.ec2.internal> Date: Mon, 24 Oct 2016 05:16:46 +0000 From: "Henry Robinson (Code Review)" To: Alex Behm , impala-cr@cloudera.com, reviews@impala.incubator.apache.org Reply-To: henry@cloudera.com X-Gerrit-MessageType: comment Subject: =?UTF-8?Q?=5BImpala-ASF-CR=5D_IMPALA-3586=3A_Clean_up_union-node=2Eh/cc_to_enable_improvements=2E=0A?= X-Gerrit-Change-Id: Ia5fc23985e8d51acb8a6920717ce4e2f0254fe70 X-Gerrit-ChangeURL: X-Gerrit-Commit: 8e2d393575744f06c84f7e5bdf31ed9803d701a8 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.12.2 archived-at: Mon, 24 Oct 2016 05:16:52 -0000 Henry Robinson has posted comments on this change. Change subject: IMPALA-3586: Clean up union-node.h/cc to enable improvements. ...................................................................... Patch Set 1: Code-Review+1 (3 comments) http://gerrit.cloudera.org:8080/#/c/4817/1/be/src/exec/union-node.cc File be/src/exec/union-node.cc: PS1, Line 72: for (int i = 0; i < const_expr_lists_.size(); ++i) { : RETURN_IF_ERROR(Expr::Prepare( : const_expr_lists_[i], state, row_desc(), expr_mem_tracker())); : AddExprCtxsToFree(const_expr_lists_[i]); : DCHECK_EQ(const_expr_lists_[i].size(), tuple_desc_->slots().size()); : } : : // Prepare result expr lists. : for (int i = 0; i < child_expr_lists_.size(); ++i) { : RETURN_IF_ERROR(Expr::Prepare( : child_expr_lists_[i], state, child(i)->row_desc(), expr_mem_tracker())); : AddExprCtxsToFree(child_expr_lists_[i]); : DCHECK_EQ(child_expr_lists_[i].size(), tuple_desc_->slots().size()); : } ranged-for loops as well? PS1, Line 220: for (int i = 0; i < const_expr_lists_.size(); ++i) { : Expr::Close(const_expr_lists_[i], state); : } : for (int i = 0; i < child_expr_lists_.size(); ++i) { : Expr::Close(child_expr_lists_[i], state); : } While you're here, can you rewrite as two ranged-for loops? http://gerrit.cloudera.org:8080/#/c/4817/1/be/src/exec/union-node.h File be/src/exec/union-node.h: Line 58: /// Const exprs materialized by this node. These exprs don't refer to any children. Add that these are only materialized by the first fragment instance to avoid duplication. -- To view, visit http://gerrit.cloudera.org:8080/4817 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ia5fc23985e8d51acb8a6920717ce4e2f0254fe70 Gerrit-PatchSet: 1 Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-Owner: Alex Behm Gerrit-Reviewer: Henry Robinson Gerrit-HasComments: Yes