not in, not exists sql result is not correct

classic Classic list List threaded Threaded
2 messages Options
marble.zhong@coinflex.com marble.zhong@coinflex.com
Reply | Threaded
Open this post in threaded view
|

not in, not exists sql result is not correct

Hi,

We are using ignite 2.8.1, with this sql statement, SELECT * FROM orders p
WHERE  NOT exists (SELECT accountid FROM account b WHERE b.accountid =
p.accountid);

Retured result accountid actually exists in table account, change to NOT IN
also is not correct. But I have another table result is correct.

Is there any suggestions? thanks.



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/
ilya.kasnacheev ilya.kasnacheev
Reply | Threaded
Open this post in threaded view
|

Re: not in, not exists sql result is not correct

Hello!

This looks like a query where the result is only correct if the data in orders and accounts are collocated.

If they are not, you may check it by setting distributedJoins=true connection property and re-running the query.


Regards,
--
Ilya Kasnacheev


ср, 18 нояб. 2020 г. в 06:03, [hidden email] <[hidden email]>:
Hi,

We are using ignite 2.8.1, with this sql statement, SELECT * FROM orders p
WHERE  NOT exists (SELECT accountid FROM account b WHERE b.accountid =
p.accountid);

Retured result accountid actually exists in table account, change to NOT IN
also is not correct. But I have another table result is correct.

Is there any suggestions? thanks.



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/