Hi, Alexey:
First, thank you.
But, I don't know how to config the affinity for my sql, because it is too
complex.
My sql is:
"select * FROm Kc21, \"Kc24Cache\".Kc24"
+ ", \"Ka06Cache\".Ka06, \"Kc60Cache\".Kc60 "
+ " WHERE Kc21.akb020 = Kc24.akb020"
+ " AND Kc21.akc190 = Kc24.akc190"
+ " AND Kc24.akb020 = Kc60.akb020"
+ " AND Kc24.akc190 = Kc60.akc190"
+ " AND Kc24.aae072 = Kc60.aae072"
+ " AND Kc24.bka135 = Kc60.bka135"
+ " AND COALESCE (Kc24.bkc380, '0') = '0'"
+ " AND Kc24.ake010 BETWEEN '2014-1-1' AND '2015-1-1'"
+ " AND Kc21.akc193 = Ka06.akc193";
I have one question:
For object Kc21, its columns akb020 and akc190 will join with columns
akb020 and akc190 of object Kc24.
And besides, the column akc193 of object Kc21 also will join with the
column akc193 of object Ka06.
According to doc, I don't know how to config two affinitys.
Thanks.
Bob
From: Alexey Goncharuk
Date: 2016-07-21 16:00
To: [email protected]
Subject: Re: SQL join query return different result under the same data when
having different ignite instance.
Hi,
Ignite 1.6 requires data to be properly collocated in order for joins to work
correctly. Namely, data being joined from tables Kc21 and Kc24 must be
collocated. See [1] for more details on affinity collocation and [2] for more
details on how SQL queries work. Also, take a look at
org.apache.ignite.examples.datagrid.CacheQueryExample for correct collocation
example.
There is a ticket [3] which will remove this restriction, and hopefully, in
will get to Ignite 1.7. You can watch this ticket for progress.
Hope this helps,
AG
---
[1] https://apacheignite.readme.io/docs/affinity-collocation
[2] https://apacheignite.readme.io/docs/sql-queries
[3] https://issues.apache.org/jira/browse/IGNITE-1232
---------------------------------------------------------------------------------------------------
Confidentiality Notice: The information contained in this e-mail and any
accompanying attachment(s)
is intended only for the use of the intended recipient and may be confidential
and/or privileged of
Neusoft Corporation, its subsidiaries and/or its affiliates. If any reader of
this communication is
not the intended recipient, unauthorized use, forwarding, printing, storing,
disclosure or copying
is strictly prohibited, and may be unlawful.If you have received this
communication in error,please
immediately notify the sender by return e-mail, and delete the original message
and all copies from
your system. Thank you.
---------------------------------------------------------------------------------------------------