xiong duan created CALCITE-6475:
-----------------------------------

             Summary: RelToSql converter fails when IN-list that the values 
include NULL is converted to Values
                 Key: CALCITE-6475
                 URL: https://issues.apache.org/jira/browse/CALCITE-6475
             Project: Calcite
          Issue Type: Bug
            Reporter: xiong duan


The SQL
{code:java}
select * from "product" where ("product_id") in (12, null){code}
When we convert the IN-list to OR condition, it can run successfully. But when 
we convert it to VALUES, it will throw NPE:
{code:java}
java.lang.NullPointerException
    at 
org.apache.calcite.rel.rel2sql.SqlImplementor.toSql(SqlImplementor.java:1468)
    at 
org.apache.calcite.rel.rel2sql.SqlImplementor.toSql(SqlImplementor.java:1416)
    at 
org.apache.calcite.rel.rel2sql.SqlImplementor$Context.toSql(SqlImplementor.java:702)
    at 
org.apache.calcite.rel.rel2sql.RelToSqlConverter.lambda$exprList$17(RelToSqlConverter.java:1158){code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to