[ 
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)

Reply via email to