Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Duplicate
-
None
-
None
-
None
Description
select * from t where v in (1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,v);
causes
java.lang.NullPointerException: scope at java.base/java.util.Objects.requireNonNull(Objects.java:233) at org.apache.calcite.sql2rel.SqlToRelConverter$Blackboard.scope(SqlToRelConverter.java:4570) at org.apache.calcite.sql2rel.SqlToRelConverter$Blackboard.lookupExp(SqlToRelConverter.java:4783) at org.apache.calcite.sql2rel.SqlToRelConverter.convertIdentifier(SqlToRelConverter.java:4097) at org.apache.calcite.sql2rel.SqlToRelConverter.access$2500(SqlToRelConverter.java:223) at org.apache.calcite.sql2rel.SqlToRelConverter$Blackboard.visit(SqlToRelConverter.java:5278) at org.apache.calcite.sql2rel.SqlToRelConverter$Blackboard.visit(SqlToRelConverter.java:4495) at org.apache.calcite.sql.SqlIdentifier.accept(SqlIdentifier.java:325) at org.apache.calcite.sql2rel.SqlToRelConverter$Blackboard.convertExpression(SqlToRelConverter.java:5097) at org.apache.calcite.sql2rel.SqlToRelConverter.convertMultisets(SqlToRelConverter.java:4261) at org.apache.calcite.sql2rel.SqlToRelConverter.convertRowConstructor(SqlToRelConverter.java:4170) at org.apache.calcite.sql2rel.SqlToRelConverter.convertRowValues(SqlToRelConverter.java:1739) at org.apache.calcite.sql2rel.SqlToRelConverter.convertQueryOrInList(SqlToRelConverter.java:1654) at org.apache.calcite.sql2rel.SqlToRelConverter.convertExists(SqlToRelConverter.java:1636) at org.apache.calcite.sql2rel.SqlToRelConverter.substituteSubQuery(SqlToRelConverter.java:1197) at org.apache.calcite.sql2rel.SqlToRelConverter.replaceSubQueries(SqlToRelConverter.java:1090) at org.apache.calcite.sql2rel.SqlToRelConverter.convertWhere(SqlToRelConverter.java:1056) at org.apache.calcite.sql2rel.SqlToRelConverter.convertSelectImpl(SqlToRelConverter.java:685) at org.apache.calcite.sql2rel.SqlToRelConverter.convertSelect(SqlToRelConverter.java:663) at org.apache.calcite.sql2rel.SqlToRelConverter.convertQueryRecursive(SqlToRelConverter.java:3535) at org.apache.calcite.sql2rel.SqlToRelConverter.convertQuery(SqlToRelConverter.java:588)
Attachments
Issue Links
- duplicates
-
CALCITE-4844 IN-list that references columns is wrongly converted to Values, and gives incorrect results
- Closed