[
https://issues.apache.org/jira/browse/CALCITE-807?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14634534#comment-14634534
]
Julian Hyde commented on CALCITE-807:
-------------------------------------
I don't think there is a bug here, except that the "matchNullability" parameter
has a very misleading name. It should be called "ignoreNullability".
Let's suppose that you have an expression e of type BIGINT NOT NULL and a type
t = INTEGER (nulls allowed).
If you call ensureType(t, e, true) the nullability of t will be ignored, the
nullability of e will be preserved, and the resulting expression will have type
BIGINT (nulls allowed).
If you call ensureType(t, e, false) the nullability will t be honored and the
resulting expression will have type BIGINT NOT NULL.
> RexBuilder.ensureType doesn't ensure type
> -----------------------------------------
>
> Key: CALCITE-807
> URL: https://issues.apache.org/jira/browse/CALCITE-807
> Project: Calcite
> Issue Type: Bug
> Reporter: Julian Hyde
> Assignee: Julian Hyde
>
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)