[ 
https://issues.apache.org/jira/browse/CALCITE-2929?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16796088#comment-16796088
 ] 

Zoltan Haindrich commented on CALCITE-2929:
-------------------------------------------

I think I now see your point: Strong is only about null-s and removing CAST 
from it because of safetiness might not be the right move.
I'll modify the pr

> Simplification of IS NULL checks are incorrectly assuming that CAST-s are 
> possible
> ----------------------------------------------------------------------------------
>
>                 Key: CALCITE-2929
>                 URL: https://issues.apache.org/jira/browse/CALCITE-2929
>             Project: Calcite
>          Issue Type: Bug
>    Affects Versions: 1.18.0
>            Reporter: Zoltan Haindrich
>            Assignee: Zoltan Haindrich
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 1.19.0
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> Example:
> {code}
> with ax(s) as (values ('xxx'),(cast(null as character varying)))
> select cast(s as int) IS NULL from ax;
> {code}
> returns a result set; which evaluates 
> however 'xxx' is not a valid integer; so an error should be recieved instead
> Another class of almost the same issue:
> {code}
> select cast('xxx' as int) IS NULL;
> {code}
> is also problematic; in that case the not nullability is deduced from the 
> fact that the literal's type is not nullable



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to