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
Describe the bug
Consider the test cases below. It is unexpected that the third query return 0 null, since the second query returns true, true, which means that the WHERE clause in the third query should be evaluated to true, true and thus return two rows in the table. Besides, if change the columns to wildcard (*), the query returns two rows as expected.
To Reproduce
DROPTABLE t0 CASCADE;
DROPTABLE t1 CASCADE;
CREATETABLEt0(c0 VARCHAR, PRIMARY KEY(c0)); -- PK is neededCREATETABLEt1(c1 INTEGER, c2 VARCHAR(500));
INSERT INTO t0 ( c0) VALUES ('a');
INSERT INTO t0 (c0) VALUES (false);
INSERT INTO t1 ( c1) VALUES ( 0);
SELECTt1.c1, t1.c2FROM t1, t0; -- 0 null, 0 nullSELECT (NOT CAST((true BETWEEN t1.c2ANDt0.c0) ASVARCHAR)) FROM t1, t0; -- true, trueSELECTt1.c1, t1.c2FROM t1, t0 WHERE (NOT CAST((true BETWEEN t1.c2ANDt0.c0) ASVARCHAR));
-- Expected: 0 null, 0 null (2 rows)-- Actual: 0 null (1 rows)-- This query could return expected resultSELECT*FROM t1, t0 WHERE (NOT CAST((true BETWEEN t1.c2ANDt0.c0) ASVARCHAR)); -- 2 rows
Expected behavior
As mentioned above
Screenshots
N/A
Software versions
Build from source:
> docker exec monetdb-test mserver5 --version --dbname=monetdb
MonetDB 5 server 11.50.0 (hg id: 1a6a23b) (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: @fdb2b8a5a74e (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.
The text was updated successfully, but these errors were encountered:
Describe the bug
Consider the test cases below. It is unexpected that the third query return
0 null
, since the second query returnstrue, true
, which means that theWHERE
clause in the third query should be evaluated totrue, true
and thus return two rows in the table. Besides, if change the columns to wildcard (*
), the query returns two rows as expected.To Reproduce
Expected behavior
As mentioned above
Screenshots
N/A
Software versions
Build from source:
Issue labeling
Bug
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: