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 4E20818F36 for ; Fri, 18 Mar 2016 22:01:42 +0000 (UTC) Received: (qmail 41576 invoked by uid 500); 18 Mar 2016 22:01:42 -0000 Delivered-To: apmail-impala-dev-archive@impala.apache.org Received: (qmail 41537 invoked by uid 500); 18 Mar 2016 22:01:42 -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 41452 invoked by uid 99); 18 Mar 2016 22:01:41 -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; Fri, 18 Mar 2016 22:01:41 +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 731B91A1125 for ; Fri, 18 Mar 2016 22:01:41 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-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 (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id Alzo4Q8G5vTt for ; Fri, 18 Mar 2016 22:01:40 +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 DD8CF5F231 for ; Fri, 18 Mar 2016 22:01:39 +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 u2IM1c1K026635; Fri, 18 Mar 2016 22:01:38 GMT Message-Id: <201603182201.u2IM1c1K026635@ip-10-146-233-104.ec2.internal> Date: Fri, 18 Mar 2016 22:01:38 +0000 From: "Skye Wanderman-Milne (Code Review)" To: impala-cr@cloudera.com, dev@impala.incubator.apache.org CC: Michael Ho Reply-To: skye@cloudera.com X-Gerrit-MessageType: comment Subject: =?UTF-8?Q?[Impala-CR](cdh5-trunk)_IMPALA-2548:_Codegen_Tuple::MaterializeExprs()_and_use_in_TopN_node=0A?= X-Gerrit-Change-Id: Ib422a8d50303c21c6a228675157bf867e8619444 X-Gerrit-ChangeURL: X-Gerrit-Commit: e3745aaba9c906f37fa9822226625fbe53d7b276 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 Skye Wanderman-Milne has posted comments on this change. Change subject: IMPALA-2548: Codegen Tuple::MaterializeExprs() and use in TopN node ...................................................................... Patch Set 9: (3 comments) http://gerrit.cloudera.org:8080/#/c/1901/9/be/src/runtime/tuple.cc File be/src/runtime/tuple.cc: Line 202: if (collect_string_vals) *total_string = 0; > Can this be moved to the body if (collect_string_vals) stmt of the caller i Done. I also made this and MaterializeExprsNoPool() below private, since they are only used for codegen. Line 326: // StringValue** non_null_string_values, int* total_string) > Please consider also adding the signature of the NoPool version. Done http://gerrit.cloudera.org:8080/#/c/1901/9/be/src/runtime/tuple.h File be/src/runtime/tuple.h: Line 151: DCHECK_EQ(materialize_expr_ctxs.size(), desc.slots().size()); : StringValue** non_null_string_values_array = NULL; : if (collect_string_vals) { : non_null_string_values->clear(); : non_null_string_values->reserve(desc.string_slots().size()); : non_null_string_values_array = non_null_string_values->data(); : } : MaterializeExprsNoPool(row, desc, materialize_expr_ctxs.data(), : non_null_string_values_array, total_string); > Why cannot this simply be MaterializeExprs(row, desc, This function is inlined in the IR, and we look for this MaterializeExprsNoPool() call for replacement. It would be nice if we didn't have to duplicate all the above code. Maybe instead of having two different functions (MaterializeExprs and MaterializeExprsNoPool), we could add a template parameter specifying whether 'pool' is NULL, and then use the templatized symbol for replacement. What do you think? The template is kind of ugly/redundant, but we avoid this copy/paste. -- To view, visit http://gerrit.cloudera.org:8080/1901 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib422a8d50303c21c6a228675157bf867e8619444 Gerrit-PatchSet: 9 Gerrit-Project: Impala Gerrit-Branch: cdh5-trunk Gerrit-Owner: Skye Wanderman-Milne Gerrit-Reviewer: Michael Ho Gerrit-Reviewer: Skye Wanderman-Milne Gerrit-HasComments: Yes