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:39:58 UTC
[jira] [Commented] (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:comment-tabpanel&focusedCommentId=15686503#comment-15686503 ]
Serhii Harnyk commented on CALCITE-1502:
----------------------------------------
I have created pull request to this Jira: https://github.com/apache/calcite/pull/328.
> 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 EXPR$0) NOT NULL
> expression type is RecordType(INTEGER NOT NULL EXPR$0) NOT NULL
> set is rel#14:LogicalProject(input=HepRelVertex#13,EXPR$0=CASE(=(1, 2), CAST($1):INTEGER, 2))
> expression is LogicalProject#16
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)