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

INCORRECT result from a distributed table full outer join a reference table #7696

Open
duerwuyi opened this issue Oct 4, 2024 · 0 comments

Comments

@duerwuyi
Copy link

duerwuyi commented Oct 4, 2024

DROP TABLE IF EXISTS t1;
create table t1 ( 
vkey int4 
);

DROP TABLE IF EXISTS t2;
create table t2 ( 
vkey int4 
);

insert into t2 (vkey) values (5);

SELECT create_distributed_table('t1', 'vkey');
SELECT create_reference_table('t2');

select * from (t2 full outer join t1 on(t2.vkey = t1.vkey ))
where not((85) in (select 1 from t2));

RESULT:
32 rows returned
5 | null
5 | null
5 | null
... (32 rows)

but, when I reproduce them without these two statements: SELECT create_distributed_table('t1', 'vkey'); and SELECT create_reference_table('t2'); , I got another RESULT, which is correct:
1 row returned
vkey | vkey
5 | null

especially, the following query returns a correct result in distributed version.

select * from (t2 full outer join t1 on(t2.vkey = t1.vkey ))
where TRUE;

1 row returned
vkey | vkey
5 | null

this bug happens in citus 12.3 and 12.5. Thanks a lot if someone could check it!

@duerwuyi duerwuyi changed the title INCORRECT result on a distributed table full outer join a reference table INCORRECT result from a distributed table full outer join a reference table Oct 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant