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 9821F200C29 for ; Tue, 14 Feb 2017 00:00:07 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 96A8A160B60; Mon, 13 Feb 2017 23:00:07 +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 E0657160B4A for ; Tue, 14 Feb 2017 00:00:06 +0100 (CET) Received: (qmail 95661 invoked by uid 500); 13 Feb 2017 23:00:06 -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 95649 invoked by uid 99); 13 Feb 2017 23:00:05 -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, 13 Feb 2017 23:00:05 +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 635621865EF for ; Mon, 13 Feb 2017 23:00:05 +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-eu.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id 6dr9jH2eyB80 for ; Mon, 13 Feb 2017 23:00:04 +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-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id CEE355F47E for ; Mon, 13 Feb 2017 23:00:03 +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 v1DN02bm016197; Mon, 13 Feb 2017 23:00:02 GMT Message-Id: <201702132300.v1DN02bm016197@ip-10-146-233-104.ec2.internal> Date: Mon, 13 Feb 2017 23:00:02 +0000 From: "Alex Behm (Code Review)" To: impala-cr@cloudera.com, reviews@impala.incubator.apache.org CC: Jim Apple , Marcel Kornacker Reply-To: alex.behm@cloudera.com X-Gerrit-MessageType: merged Subject: =?UTF-8?Q?=5BImpala-ASF-CR=5D_IMPALA-4263=3A_Fix_wrong_ommission_of_agg/analytic_hash_exchanges=2E=0A?= X-Gerrit-Change-Id: I121222179378e56836422a69451d840a012c9e54 X-Gerrit-ChangeURL: X-Gerrit-Commit: cd153d66dc20ebea7a9de7a2ef1c627fee45253c 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.7 archived-at: Mon, 13 Feb 2017 23:00:07 -0000 Alex Behm has submitted this change and it was merged. Change subject: IMPALA-4263: Fix wrong ommission of agg/analytic hash exchanges. ...................................................................... IMPALA-4263: Fix wrong ommission of agg/analytic hash exchanges. The bug: Our detection of partition compatibility for grouping aggregations and analytic functions did not take into account the effect of outer joins within the same fragment. As a result, we used to incorrectly omit a required hash exchange. For example, a hash exchange + merge phase is required if the grouping expressions of an aggregation reference tuples that are made nullable within the same fragment. The exchange is needed to bring together NULLs produced by outer-join non-matches. The fix: Check that the grouping/partition exprs do not reference tuples that are made nullable within the same fragment. Testing: Planner tests pass locally. Change-Id: I121222179378e56836422a69451d840a012c9e54 Reviewed-on: http://gerrit.cloudera.org:8080/5774 Reviewed-by: Alex Behm Tested-by: Alex Behm --- M fe/src/main/java/org/apache/impala/planner/DistributedPlanner.java M fe/src/main/java/org/apache/impala/planner/PlanFragment.java M testdata/workloads/functional-planner/queries/PlannerTest/aggregation.test M testdata/workloads/functional-planner/queries/PlannerTest/analytic-fns.test 4 files changed, 190 insertions(+), 24 deletions(-) Approvals: Alex Behm: Looks good to me, approved; Verified -- To view, visit http://gerrit.cloudera.org:8080/5774 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: merged Gerrit-Change-Id: I121222179378e56836422a69451d840a012c9e54 Gerrit-PatchSet: 3 Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-Owner: Alex Behm Gerrit-Reviewer: Alex Behm Gerrit-Reviewer: Jim Apple Gerrit-Reviewer: Marcel Kornacker