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 AAB74200497 for ; Wed, 23 Aug 2017 18:47:22 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id A918A169252; Wed, 23 Aug 2017 16:47:22 +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 EC44116924A for ; Wed, 23 Aug 2017 18:47:21 +0200 (CEST) Received: (qmail 91419 invoked by uid 500); 23 Aug 2017 16:47:20 -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 91408 invoked by uid 99); 23 Aug 2017 16:47:19 -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; Wed, 23 Aug 2017 16:47:19 +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 75C0E1A1FC9 for ; Wed, 23 Aug 2017 16:47:19 +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 mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id NVpfBosVr_As for ; Wed, 23 Aug 2017 16:47:18 +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 2278E62447 for ; Wed, 23 Aug 2017 16:47:13 +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 v7NGlBn7017210; Wed, 23 Aug 2017 16:47:12 GMT Message-Id: <201708231647.v7NGlBn7017210@ip-10-146-233-104.ec2.internal> Date: Wed, 23 Aug 2017 16:47:11 +0000 From: "Philip Zeyliger (Code Review)" To: Dan Hecht , impala-cr@cloudera.com, reviews@impala.incubator.apache.org Reply-To: philip@cloudera.com X-Gerrit-MessageType: newpatchset Subject: =?UTF-8?Q?=5BImpala-ASF-CR=5D_IMPALA-5211=2E_Simplifying_ifnull/isnull/nvl_where_conditional_is_a_literal=2E=0A?= X-Gerrit-Change-Id: I9e4b8bf6fedd595f9ea54ffb30fc71a058c7f16c X-Gerrit-ChangeURL: X-Gerrit-Commit: e2923088df5d4b6058da2defa5c84418426f6c36 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: Wed, 23 Aug 2017 16:47:22 -0000 Hello Dan Hecht, I'd like you to reexamine a change. Please visit http://gerrit.cloudera.org:8080/7781 to look at the new patch set (#2). Change subject: IMPALA-5211. Simplifying ifnull/isnull/nvl where conditional is a literal. ...................................................................... IMPALA-5211. Simplifying ifnull/isnull/nvl where conditional is a literal. Added code to simplify ifnull(, ) to x if is NULL or if it's not NULL. Removed a few unused Java imports. I did the naive thing for recognizing that ifnull has variants. It looks like common/function-registry/impala_functions.py is used to generate ScalarBuiltins.java, and a similar approach could be taken. There are more conditional functions where similar approaches can be taken; IMPALA-5211 is not yet complete with just this patch. Testing: * Added new cases to existing unit test. Change-Id: I9e4b8bf6fedd595f9ea54ffb30fc71a058c7f16c --- M fe/src/main/java/org/apache/impala/rewrite/SimplifyConditionalsRule.java M fe/src/test/java/org/apache/impala/analysis/ExprRewriteRulesTest.java 2 files changed, 32 insertions(+), 3 deletions(-) git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/81/7781/2 -- To view, visit http://gerrit.cloudera.org:8080/7781 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I9e4b8bf6fedd595f9ea54ffb30fc71a058c7f16c Gerrit-PatchSet: 2 Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-Owner: Philip Zeyliger Gerrit-Reviewer: Dan Hecht