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 C0EA8200B3C for ; Wed, 13 Jul 2016 21:01:39 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id BF71A160A6A; Wed, 13 Jul 2016 19:01:39 +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 15345160A62 for ; Wed, 13 Jul 2016 21:01:38 +0200 (CEST) Received: (qmail 38009 invoked by uid 500); 13 Jul 2016 19:01:38 -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 37995 invoked by uid 99); 13 Jul 2016 19:01:38 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 13 Jul 2016 19:01:38 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 81D2EC04FD for ; Wed, 13 Jul 2016 19:01:37 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-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 (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id K-CyyIBYnmhS for ; Wed, 13 Jul 2016 19:01:35 +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 6F7BE5F201 for ; Wed, 13 Jul 2016 19:01:35 +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 u6DJ1Wx3003498; Wed, 13 Jul 2016 19:01:32 GMT Message-Id: <201607131901.u6DJ1Wx3003498@ip-10-146-233-104.ec2.internal> Date: Wed, 13 Jul 2016 19:01:26 +0000 From: "Thomas Tauber-Marshall (Code Review)" To: impala-cr@cloudera.com, dev@impala.incubator.apache.org CC: Marcel Kornacker , Matthew Jacobs Reply-To: tmarshall@cloudera.com X-Gerrit-MessageType: newpatchset Subject: =?UTF-8?Q?=5BImpala-CR=5D=28cdh5-trunk=29_IMPALA-3210=3A_last/first_value=28=29_support_for_IGNORE_NULLS=0A?= X-Gerrit-Change-Id: Ic27525e2237fb54318549d2674f1610884208e9b X-Gerrit-ChangeURL: X-Gerrit-Commit: 556357f1dc9501ad36c82c4c2918adfc2ad2a757 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: Wed, 13 Jul 2016 19:01:39 -0000 Thomas Tauber-Marshall has uploaded a new patch set (#11). Change subject: IMPALA-3210: last/first_value() support for IGNORE NULLS ...................................................................... IMPALA-3210: last/first_value() support for IGNORE NULLS Added support for the 'ignore nulls' keyword to the last_value and first_value analytic functions, eg. 'last_value(col ignore nulls)', which would return the last value from the window that is not null, or null if all of the values in the window are null. We handle 'ignore nulls' in the FE in the same way that we handle 'distinct' - by adding isIgnoreNulls as a field in FunctionParams. To avoid affecting performance when 'ignore nulls' is not used, and to avoid having to special case 'ignore nulls' on the backend, this patch adds 'last_value_ignore_nulls' and 'first_value_ignore_nulls' builtin analytic functions that wrap 'last_value' and 'first_value' respectively. Change-Id: Ic27525e2237fb54318549d2674f1610884208e9b --- M be/src/exprs/aggregate-functions-ir.cc M be/src/exprs/aggregate-functions.h M fe/src/main/cup/sql-parser.cup M fe/src/main/java/com/cloudera/impala/analysis/AnalyticExpr.java M fe/src/main/java/com/cloudera/impala/analysis/FunctionCallExpr.java M fe/src/main/java/com/cloudera/impala/analysis/FunctionParams.java M fe/src/main/java/com/cloudera/impala/catalog/BuiltinsDb.java M fe/src/test/java/com/cloudera/impala/analysis/AnalyzeExprsTest.java M testdata/workloads/functional-planner/queries/PlannerTest/analytic-fns.test M testdata/workloads/functional-query/queries/QueryTest/analytic-fns.test M testdata/workloads/functional-query/queries/QueryTest/decimal.test 11 files changed, 913 insertions(+), 137 deletions(-) git pull ssh://gerrit.cloudera.org:29418/Impala refs/changes/28/3328/11 -- To view, visit http://gerrit.cloudera.org:8080/3328 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ic27525e2237fb54318549d2674f1610884208e9b Gerrit-PatchSet: 11 Gerrit-Project: Impala Gerrit-Branch: cdh5-trunk Gerrit-Owner: Thomas Tauber-Marshall Gerrit-Reviewer: Marcel Kornacker Gerrit-Reviewer: Matthew Jacobs Gerrit-Reviewer: Thomas Tauber-Marshall