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 68FCE200D1B for ; Thu, 7 Sep 2017 00:36:06 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 677CC1609E3; Wed, 6 Sep 2017 22:36:06 +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 B694416128F for ; Thu, 7 Sep 2017 00:36:05 +0200 (CEST) Received: (qmail 80509 invoked by uid 500); 6 Sep 2017 22:36:04 -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 80487 invoked by uid 99); 6 Sep 2017 22:36:03 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 Sep 2017 22:36:03 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 40137CD513 for ; Wed, 6 Sep 2017 22:36:03 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-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 (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id gRiVCendPo-V for ; Wed, 6 Sep 2017 22:36:02 +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 2A82761260 for ; Wed, 6 Sep 2017 22:36:02 +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 v86Ma1vX005629; Wed, 6 Sep 2017 22:36:01 GMT Message-Id: <201709062236.v86Ma1vX005629@ip-10-146-233-104.ec2.internal> Date: Wed, 6 Sep 2017 22:36:01 +0000 From: "Philip Zeyliger (Code Review)" To: impala-cr@cloudera.com, reviews@impala.incubator.apache.org CC: Alex Behm , Matthew Jacobs Reply-To: philip@cloudera.com X-Gerrit-MessageType: comment Subject: =?UTF-8?Q?=5BImpala-ASF-CR=5D_IMPALA-5211=3A_Simplifying_ifnull_conditional=2E=0A?= X-Gerrit-Change-Id: Id91ca968a0c0be44e1ec54ad8602f91a5cb2e0e5 X-Gerrit-ChangeURL: X-Gerrit-Commit: 5e532cebc55444255a2e86262595802a94571f10 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, 06 Sep 2017 22:36:06 -0000 Philip Zeyliger has posted comments on this change. Change subject: IMPALA-5211: Simplifying ifnull conditional. ...................................................................... Patch Set 5: Alex, Thanks for your reviews. I put together a new diff which ties to do the re-write. The unit test passes, but I'm just now kicking off the full tests. That said, I've got two questions I could use your advice on: * Am I right in thinking that I can now go and delete IFNULL code from the backend? * I'm worried about the types of NullLiteral. i.e., when I do the re-write I don't have the types of expressions here. I'm worried there's nuance here I don't yet know about. I also am beginning to suspect that I shouldn't be special-casing if. Instead, "x [not] distinct from x -> false [true]" should be its own rule. Then this would apply in a few more cases. After this conversation, we also think that https://impala.incubator.apache.org/docs/build/html/topics/impala_conditional_functions.html is wrong about how it rewrites nullif. It uses "=" and not "<=>" and so is wrong about nulls. I'm happy to update the docs or file a JIRA. Thanks! -- To view, visit http://gerrit.cloudera.org:8080/7829 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: comment Gerrit-Change-Id: Id91ca968a0c0be44e1ec54ad8602f91a5cb2e0e5 Gerrit-PatchSet: 5 Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-Owner: Philip Zeyliger Gerrit-Reviewer: Alex Behm Gerrit-Reviewer: Matthew Jacobs Gerrit-Reviewer: Philip Zeyliger Gerrit-HasComments: No