You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@calcite.apache.org by xiong duan <no...@gmail.com> on 2022/04/02 06:32:34 UTC

Requesting a Review about PR----[CALCITE-5021]

Hi Follower,
     Please help review this PR about optimizing the NOT IN, So that I can
make some improvements. Thanks very much.

Double JOIN is created for NOT IN when IN-list that the values all
non-nullable is converted to Values.

This is caused by we infer the IN-list type by the left type the IN-list
Type
<https://github.com/apache/calcite/blob/master/core/src/main/java/org/apache/calcite/sql2rel/SqlToRelConverter.java#L1677>.
So when the left key node includes the nullable column, Then we think the
IN-list has a NULL value. Actually don't.

The ISSUE ADDRESS:https://issues.apache.org/jira/browse/CALCITE-5021
The PR ADDRESS:https://github.com/apache/calcite/pull/2735