You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Serhii Harnyk (JIRA)" <ji...@apache.org> on 2016/11/22 11:08:58 UTC

[jira] [Updated] (CALCITE-1502) AssertionError when case statement is used with optional value and literal, using ReduceExpressionsRule

     [ https://issues.apache.org/jira/browse/CALCITE-1502?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Serhii Harnyk updated CALCITE-1502:
-----------------------------------
    Component/s: core

> AssertionError when case statement is used with optional value and literal, using ReduceExpressionsRule
> -------------------------------------------------------------------------------------------------------
>
>                 Key: CALCITE-1502
>                 URL: https://issues.apache.org/jira/browse/CALCITE-1502
>             Project: Calcite
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 1.10.0
>            Reporter: Serhii Harnyk
>            Assignee: Julian Hyde
>             Fix For: 1.11.0
>
>
> AssertionError when we use case with optional value and literal, using ReduceExpressionsRule:
> {noformat}
> SELECT CASE WHEN 1=2 THEN cast((values(1)) as integer) ELSE 2 end from (values(1))
> {noformat}
> Stack trace:
> {noformat}
> java.lang.AssertionError: Internal error: Cannot add expression of different type to set:
> set type is RecordType(INTEGER STATE_NM) NOT NULL
> expression type is RecordType(INTEGER NOT NULL STATE_NM) NOT NULL
> set is rel#14:LogicalProject(input=HepRelVertex#13,STATE_NM=CASE(=(1, 2), CAST($1):INTEGER, 2))
> expression is LogicalProject#16
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)