[
https://issues.apache.org/jira/browse/CALCITE-4846?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17444561#comment-17444561
]
duan xiong commented on CALCITE-4846:
-------------------------------------
Fixed in
[0899e6c157|https://github.com/apache/calcite/commit/0899e6c157632ba1c5369a942cfe2be15fb4ed9f].
Thanks for your review [~vlsi].
> IN-list that includes NULL converted to Values throws exception
> ---------------------------------------------------------------
>
> Key: CALCITE-4846
> URL: https://issues.apache.org/jira/browse/CALCITE-4846
> Project: Calcite
> Issue Type: Bug
> Affects Versions: 1.27.0
> Reporter: duan xiong
> Assignee: duan xiong
> Priority: Major
> Labels: pull-request-available
> Time Spent: 1h 10m
> Remaining Estimate: 0h
>
> Run this SQL in JdbcExample :
> {code:java}
> select * from foodmart.sales_fact_1997 as s where s.cust_id not in (null,
> 100)
> {code}
> will throw an exception:
> {noformat}
> Caused by: org.apache.calcite.runtime.CalciteException: Cannot convert null
> to int{noformat}
> Because when convert ROW values generate the wrong RelDataType:
> {noformat}
> type=RecordType(JavaType(int) ROW_VALUE),tuples=[{ null }, { 100 }]){noformat}
> should be(nullable):
> {noformat}
> type=RecordType(INTEGER ROW_VALUE),tuples=[{ null }, { 100 }]){noformat}
--
This message was sent by Atlassian Jira
(v8.20.1#820001)