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 BETWEEN operator #7428
Describe the bug
Consider the test cases below. It is unexpected that the third query returns one row only, since the second query returns true, true, which means that the WHERE clause in the third query should be evaluated to true and thus return all two rows in the table after join.
To Reproduce
CREATETABLEt0(c0 INTEGER, c1 BOOL, PRIMARY KEY(c0));
CREATETABLEt1(c0 INTEGER, PRIMARY KEY(c0));
INSERT INTO t0 (c0) VALUES (0);
INSERT INTO t1 (c0) VALUES (1);
INSERT INTO t1 (c0) VALUES (2);
SELECTt0.c1FROM t0, t1; -- null, nullSELECT (((true BETWEEN t0.c1ANDt1.c0)) IS NULL) FROM t0, t1; -- true, trueSELECTt0.c1FROM t0, t1 WHERE (((true BETWEEN t0.c1ANDt1.c0)) IS NULL);
-- Expected: null, null (two rows)-- Actual: null (one row)
Expected behavior
As mentioned above
Screenshots
N/A
Software versions
Build from source:
root@035e0b00c896:/app# mserver5 --version --dbname=monetdb
MonetDB 5 server 11.50.0 (hg id: 3bb73c2) (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: @897761d12f5d (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
lrpereira commentedon Jan 24, 2024
Fixed in Dec2023 branch.