You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Unexpected result when using IS DISTINCT FROM with AND #7534
Describe the bug
Executing a SELECT query with a condition using IS DISTINCT FROM inside a WHERE clause returns an empty result set when it should return a row. The expression should be evaluated to TRUE as shown in the second query, and thus the third query should fetch one row in the table
To Reproduce
DROPTABLE IF EXISTS t0 CASCADE;
CREATETABLEt0(c0 VARCHAR);
INSERT INTO t0 (c0) VALUES ('a');
SELECTt0.c0FROM t0; -- aSELECT (1AND ('' IS DISTINCT FROMt0.c0)) FROM t0; -- trueSELECTt0.c0FROM t0 WHERE (1AND ('' IS DISTINCT FROMt0.c0));
-- Expected: a-- Actual: empty table
Expected behavior
As mentioned above.
Screenshots
N/A
Software versions
Build from source:
> docker exec -it monetdb-test mserver5 --version
MonetDB 5 server 11.52.0 (hg id: 0fbb4da) (64-bit, 128-bit integers)
This is an unreleased version
Copyright (c) 1993 - July 2008 CWI
Copyright (c) August 2008 - 2023 MonetDB B.V., all rights reserved
Visit https://www.monetdb.org/ for further information
Found 503.5GiB available memory, 128 available cpu cores
Libraries:
Compiled by: @6a1bbdadc0f6 (x86_64-pc-linux-gnu)
Compilation: /usr/bin/cc
Linking : /usr/bin/ld
Issue labeling
Bug
Additional context
Add any other context about the problem here.
Activity