Changeset: 18bb52d72122 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/18bb52d72122 Added Files: sql/test/rel-optimizers/Tests/isnull-isnotnull-equality-exp.test Modified Files: sql/test/rel-optimizers/Tests/All Branch: default Log Message:
Adds tests for isnull-isnotnull exp optimization diffs (83 lines): diff --git a/sql/test/rel-optimizers/Tests/All b/sql/test/rel-optimizers/Tests/All --- a/sql/test/rel-optimizers/Tests/All +++ b/sql/test/rel-optimizers/Tests/All @@ -15,3 +15,4 @@ merge-unions merge-ors-base merge-ors-single-col-eq-to-cmp_in merge-ors-multi-col-eq-to-cmp_in +isnull-isnotnull-equality-exp diff --git a/sql/test/rel-optimizers/Tests/isnull-isnotnull-equality-exp.test b/sql/test/rel-optimizers/Tests/isnull-isnotnull-equality-exp.test new file mode 100644 --- /dev/null +++ b/sql/test/rel-optimizers/Tests/isnull-isnotnull-equality-exp.test @@ -0,0 +1,70 @@ +statement ok +create table foo (n int, m text); + +statement ok +insert into foo values (1, 'one'), (NULL, 'mighty null'), (2, 'two'); + +query IT rowsort +select * from foo where n is null; +---- +NULL +mighty null + +query T +plan select * from foo where n is null; +---- +project ( +| select ( +| | table("sys"."foo") [ "foo"."n", "foo"."m" NOT NULL ] +| ) [ ("foo"."n") * = (int(2) NULL) ] +) [ "foo"."n", "foo"."m" NOT NULL ] + +query IT rowsort +select * from foo where not n is null; +---- +1 +one +2 +two + +query T +plan select * from foo where not n is null; +---- +project ( +| select ( +| | table("sys"."foo") [ "foo"."n", "foo"."m" NOT NULL ] +| ) [ ("foo"."n") ! * = (int(2) NULL) ] +) [ "foo"."n" NOT NULL, "foo"."m" NOT NULL ] + +query IT rowsort +select * from foo where n is not null; +---- +1 +one +2 +two + +query T +plan select * from foo where n is not null; +---- +project ( +| select ( +| | table("sys"."foo") [ "foo"."n", "foo"."m" NOT NULL ] +| ) [ ("foo"."n") ! * = (int(2) NULL) ] +) [ "foo"."n" NOT NULL, "foo"."m" NOT NULL ] + +query IT rowsort +select * from foo where not n is not null; +---- +NULL +mighty null + +query T +plan select * from foo where not n is not null; +---- +project ( +| select ( +| | table("sys"."foo") [ "foo"."n", "foo"."m" NOT NULL ] +| ) [ ("foo"."n") * = (int(2) NULL) ] +) [ "foo"."n", "foo"."m" NOT NULL ] + _______________________________________________ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org