Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unexpected Results when Using NATURAL LEFT JOIN #13572

Closed
suyZhong opened this issue Nov 21, 2023 · 0 comments · Fixed by #13581
Closed

Unexpected Results when Using NATURAL LEFT JOIN #13572

suyZhong opened this issue Nov 21, 2023 · 0 comments · Fixed by #13581
Assignees
Labels
type/bug Something isn't working
Milestone

Comments

@suyZhong
Copy link

Describe the bug

Consider the following test case. It is unexpected that the second query return 0, since the first query without WHERE condition has a result NULL.

Error message/log

No response

To Reproduce

CREATE TABLE t0(c0 INT, c1 INT, c2 INT, PRIMARY KEY(c0));
CREATE TABLE t1(c0 INT, c1 INT, PRIMARY KEY(c0));

INSERT INTO t0(c0, c1, c2) VALUES (1, 1,  1);
INSERT INTO t1(c0) VALUES (2);

SELECT c2 FROM t1 NATURAL LEFT JOIN t0; -- NULL
SELECT c2 FROM t1 NATURAL LEFT JOIN t0 WHERE (c1 IS NULL); -- 0

Expected behavior

I expected the second query to also return the same as the first one.

How did you deploy RisingWave?

via Docker image and online playground

The version of RisingWave

dev=> SELECT version();
                                     version                                      
----------------------------------------------------------------------------------
 PostgreSQL 9.5-RisingWave-1.3.0-alpha (4313a5a8fe3a11a0edaa3ff8f4fdb639123be618)

Additional context

No response

@suyZhong suyZhong added the type/bug Something isn't working label Nov 21, 2023
@github-actions github-actions bot added this to the release-1.5 milestone Nov 21, 2023
@chenzl25 chenzl25 self-assigned this Nov 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants