[
https://issues.apache.org/jira/browse/CALCITE-766?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14601940#comment-14601940
]
Julian Hyde commented on CALCITE-766:
-------------------------------------
I can believe that there is a bug in makeOver. If "SUM(x) OVER w" is nullable
and is rewritten to something involving "SUM0" then the rewritten expression
must have the same nullability.
Do note that the rules about whether "SUM(x) OVER w" is nullable are complex.
They include whether x is nullable and whether w is is possible for w to
contain 0 rows.
> RexBuilder.ensureType() does not correctly handle the case when nullability
> needs to be ignored
> -----------------------------------------------------------------------------------------------
>
> Key: CALCITE-766
> URL: https://issues.apache.org/jira/browse/CALCITE-766
> Project: Calcite
> Issue Type: Bug
> Reporter: Mehant Baid
> Assignee: Julian Hyde
>
> In ensureType() we don't correctly handle the case when nullability should be
> ignored. We still compare digests of the two types which returns false even
> when the types are the same but differ only in nullability.
> Created a [Pull Request|https://github.com/apache/incubator-calcite/pull/97]
> with the description of the issue and a unit test.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)