Describe the problem
Consider the test case below. It is unexpected that the third query returns a row 1 NULL, since the second query shows that the expression should be evaluated to false.
To Reproduce
What did you do? Describe in your own words.
Start the CockroachDB instance by using Docker.
docker run --name cockroachdb-test -p 10011:26257 -p 10012:8080 cockroachdb/cockroach:latest start-single-node --insecure
Execute the below statements through psql:
DROP DATABASE IF EXISTS test;
CREATE DATABASE test;
USE test;
CREATE TABLE t0(c0 INT, c1 INT);
INSERT INTO t0(c0) VALUES (1);
SELECT * FROM t0; -- 1 NULL
SELECT ((t0.c0, t0.c1) IS NOT NULL) FROM t0; -- f
SELECT * FROM t0 WHERE ((t0.c0, t0.c1) IS NOT NULL);
-- Expected: empty
-- Actual: 1 NULL
Expected behavior
The third query should return an empty result
Additional data / screenshots
If the problem is SQL-related, include a copy of the SQL query and the schema
of the supporting tables.
If a node in your cluster encountered a fatal error, supply the contents of the
log directories (at minimum of the affected node(s), but preferably all nodes).
Note that log files can contain confidential information. Please continue
creating this issue, but contact support@cockroachlabs.com to submit the log
files in private.
If applicable, add screenshots to help explain your problem.
Environment:
- CockroachDB version 24.2.1
- Server OS: Docker image
- Client app: psql and JDBC
Additional context
What was the impact?
Add any other context about the problem here.
Jira issue: CRDB-42161
Describe the problem
Consider the test case below. It is unexpected that the third query returns a row
1 NULL, since the second query shows that the expression should be evaluated tofalse.To Reproduce
What did you do? Describe in your own words.
Start the CockroachDB instance by using Docker.
Execute the below statements through psql:
Expected behavior
The third query should return an empty result
Additional data / screenshots
If the problem is SQL-related, include a copy of the SQL query and the schema
of the supporting tables.
If a node in your cluster encountered a fatal error, supply the contents of the
log directories (at minimum of the affected node(s), but preferably all nodes).
Note that log files can contain confidential information. Please continue
creating this issue, but contact support@cockroachlabs.com to submit the log
files in private.
If applicable, add screenshots to help explain your problem.
Environment:
Additional context
What was the impact?
Add any other context about the problem here.
Jira issue: CRDB-42161