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 935FA200AF2 for ; Wed, 4 May 2016 23:41:14 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 9222D1609FC; Wed, 4 May 2016 21:41:14 +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 DADA51609A1 for ; Wed, 4 May 2016 23:41:13 +0200 (CEST) Received: (qmail 70018 invoked by uid 500); 4 May 2016 21:41:13 -0000 Mailing-List: contact issues-help@drill.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@drill.apache.org Delivered-To: mailing list issues@drill.apache.org Received: (qmail 70005 invoked by uid 99); 4 May 2016 21:41:13 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 May 2016 21:41:13 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 043D12C1F5C for ; Wed, 4 May 2016 21:41:13 +0000 (UTC) Date: Wed, 4 May 2016 21:41:13 +0000 (UTC) From: "Sean Hsuan-Yi Chu (JIRA)" To: issues@drill.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (DRILL-4656) The inferred nullability of "is null" can at times be incorrect MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Wed, 04 May 2016 21:41:14 -0000 [ https://issues.apache.org/jira/browse/DRILL-4656?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Sean Hsuan-Yi Chu updated DRILL-4656: ------------------------------------- Description: In SQL, the nullability of "is null" should always be non-nullable, regardless of the input type. Because of the short-cut here [1], the nullability is true. That shortcut is to avoid the following failure in WHERE clause: {code} WHERE booleanFunc(ANY type) {code} [1] https://github.com/apache/drill/blob/master/exec/java-exec/src/main/java/org/apache/drill/exec/planner/sql/TypeInferenceUtils.java#L250 was: In SQL, the nullability of "is null" should always be non-nullable, regardless of the input type. Because of the short-cut here [1], the nullability is true. That shortcut is to avoid the following failure in WHERE clause: {code} WHERE booleanFunc(ANY) {code} Thus, instead of terminating the logic some early, Drill should have kept going down till function resolution. [1] https://github.com/apache/drill/blob/master/exec/java-exec/src/main/java/org/apache/drill/exec/planner/sql/TypeInferenceUtils.java#L250 > The inferred nullability of "is null" can at times be incorrect > --------------------------------------------------------------- > > Key: DRILL-4656 > URL: https://issues.apache.org/jira/browse/DRILL-4656 > Project: Apache Drill > Issue Type: Bug > Components: Query Planning & Optimization > Reporter: Sean Hsuan-Yi Chu > > In SQL, the nullability of "is null" should always be non-nullable, regardless of the input type. > Because of the short-cut here [1], the nullability is true. That shortcut is to avoid the following failure in WHERE clause: > {code} > WHERE booleanFunc(ANY type) > {code} > [1] https://github.com/apache/drill/blob/master/exec/java-exec/src/main/java/org/apache/drill/exec/planner/sql/TypeInferenceUtils.java#L250 -- This message was sent by Atlassian JIRA (v6.3.4#6332)