CrateDB version
5.5.0 docker image
CrateDB setup information
-Cdiscovery.type=single-node
Problem description
The third SELECT returns an empty result, which is surprising, given that the result of the second query is TRUE. The value of the CASE expression should always be true, and thus the third query should return the whole table.
Steps to Reproduce
CREATE TABLE t1 (c0 INT);
INSERT INTO t1 VALUES (NULL);
SELECT * FROM t1; -- NULL
SELECT (CASE WHEN 1 THEN 2 ELSE c0 END )!=1 FROM t1; -- TRUE
SELECT * FROM t1 WHERE (CASE WHEN 1 THEN 2 ELSE c0 END )!=1;
Actual Result
Empty table
Expected Result
NULL
CrateDB version
5.5.0 docker image
CrateDB setup information
-Cdiscovery.type=single-node
Problem description
The third
SELECTreturns an empty result, which is surprising, given that the result of the second query isTRUE. The value of theCASEexpression should always be true, and thus the third query should return the whole table.Steps to Reproduce
Actual Result
Empty table
Expected Result
NULL