[
https://issues.apache.org/jira/browse/CALCITE-4756?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Ruben Q L resolved CALCITE-4756.
--------------------------------
Resolution: Fixed
> When subquery include NULL value, Calcite should return the right result
> ------------------------------------------------------------------------
>
> Key: CALCITE-4756
> URL: https://issues.apache.org/jira/browse/CALCITE-4756
> Project: Calcite
> Issue Type: Bug
> Components: core
> Affects Versions: 1.27.0
> Reporter: xiong duan
> Assignee: xiong duan
> Priority: Major
> Labels: pull-request-available
> Fix For: 1.41.0
>
> Time Spent: 10m
> Remaining Estimate: 0h
>
> When I try to design some unit tests for CALCITE-4742. I found Calcite can't
> handle NULL very well in some subquery.
> For example:
> {code:java}
> select 1 in (values(null),(null))
> ERROR:
> java.lang.AssertionError: Conversion to relational algebra failed to
> preserve datatypes:
> validated type:
> RecordType(BOOLEAN NOT NULL EXPR$0) NOT NULL
> converted type:
> RecordType(BOOLEAN EXPR$0) NOT NULL
> rel:
> LogicalProject(EXPR$0=[IN(1, {
> LogicalValues(tuples=[[{ null }]])
> })])
> LogicalValues(tuples=[[{ 0 }]])
> select 1 > some(values(null),(null))
> ERROR:
> Suppressed: java.lang.RuntimeException: while resolving method
> 'voidValue' in class class java.lang.Void{code}
> This SQL should return NULL. But throw the runtime exception.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)