Changeset: 49459db9d102 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/49459db9d102 Modified Files: sql/test/sys-schema/Tests/webExamplesLogicalFunctionsOperators.test Branch: Sep2022 Log Message:
Extend test with two queries which can be used to simulate "a IS DISTINCT FROM b" and "a IS NOT DISTINCT FROM b" syntax as listed in issue 7332. diffs (94 lines): diff --git a/sql/test/sys-schema/Tests/webExamplesLogicalFunctionsOperators.test b/sql/test/sys-schema/Tests/webExamplesLogicalFunctionsOperators.test --- a/sql/test/sys-schema/Tests/webExamplesLogicalFunctionsOperators.test +++ b/sql/test/sys-schema/Tests/webExamplesLogicalFunctionsOperators.test @@ -400,6 +400,90 @@ NULL NULL NULL +# see request: https://github.com/MonetDB/MonetDB/issues/7332 +# next case should return similar result as: a IS NOT DISTINCT FROM b syntax +query III rowsort +select a, b, CASE + WHEN a IS NOT NULL AND b IS NOT NULL + THEN a = b + WHEN a IS NOT NULL AND b IS NULL + THEN false + WHEN a IS NULL AND b IS NULL + THEN true + ELSE false +END as "a_equals_b" from b +order by a NULLS LAST, b NULLS last +---- +0 +0 +1 +0 +1 +0 +0 +NULL +0 +1 +0 +0 +1 +1 +1 +1 +NULL +0 +NULL +0 +0 +NULL +1 +0 +NULL +NULL +1 + +# see request: https://github.com/MonetDB/MonetDB/issues/7332 +# next case should return similar result as: a IS DISTINCT FROM b syntax +query III rowsort +select a, b, CASE + WHEN a IS NOT NULL AND b IS NOT NULL + THEN a <> b + WHEN a IS NOT NULL AND b IS NULL + THEN true + WHEN a IS NULL AND b IS NULL + THEN false + ELSE true +END as "a_notequals_b" from b +order by a NULLS LAST, b NULLS last +---- +0 +0 +0 +0 +1 +1 +0 +NULL +1 +1 +0 +1 +1 +1 +0 +1 +NULL +1 +NULL +0 +1 +NULL +1 +1 +NULL +NULL +0 + statement ok drop view if exists b3 _______________________________________________ checkin-list mailing list -- [email protected] To unsubscribe send an email to [email protected]
