You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Zoltan Haindrich (JIRA)" <ji...@apache.org> on 2019/03/18 09:03:00 UTC
[jira] [Commented] (CALCITE-2929) Simplification of IS NULL checks
are incorrectly assuming that CAST-s are possible
[ https://issues.apache.org/jira/browse/CALCITE-2929?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16794849#comment-16794849 ]
Zoltan Haindrich commented on CALCITE-2929:
-------------------------------------------
This is starting to get more complicated than it first seemed...I've run some bisects against a hive issue which lead to CALCITE-2469
however both of my example issues in the description "doesn't changed behaviour" with that patch :D
> 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
> Reporter: Zoltan Haindrich
> Assignee: Zoltan Haindrich
> Priority: Major
>
> 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)