You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Julian Hyde (JIRA)" <ji...@apache.org> on 2015/06/25 23:37:04 UTC

[jira] [Comment Edited] (CALCITE-766) RexBuilder.ensureType() does not correctly handle the case when nullability needs to be ignored

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

Julian Hyde edited comment on CALCITE-766 at 6/25/15 9:36 PM:
--------------------------------------------------------------

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.


was (Author: julianhyde):
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)