NOT IN with an AND containing an OR gives wrong result #6775
Last updated: 2019-11-28 10:00:04 +0100
Date: 2019-10-19 21:06:40 +0200
In the Nov2019 branch, the combination of NOT IN with an AND clause which contains at least one OR clause gives wrong results (as shown in the results of the SELECT query below). This is because the NOT IN is translated in the logical plan into an IN (as shown in the results of the PLAN below).
CREATE TABLE t (i INT, s VARCHAR(32));
sql>SELECT i FROM t WHERE t.i NOT IN (-450 , 29) AND (t."s" <> 'xyz' OR t."s" IS NULL );
sql>PLAN SELECT i FROM t WHERE t.i NOT IN (-450 , 29) AND (t."s" <> 'xyz' OR t."s" IS NULL );
Date: 2019-10-19 21:27:54 +0200
For complete details, see https//devmonetdborg/hg/MonetDB?cmd=changeset;node=8e63d332f667
Date: 2019-10-19 23:23:55 +0200
The problem happens in the rel_select_cse optimizer.
The text was updated successfully, but these errors were encountered: