You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by 38797715 <38...@qq.com> on 2021/04/12 10:03:25 UTC
[2.10]If affinityKey is used as a where condition, cannot retrieve
the result set
Hi team,
test.zip Is a single node snapshot compressed file.
Unzip the file to the work directory of ignite, and then use the
example.xml start a node and activate the cluster.
You will see a table called viewsortcontrol.
Execute the following SQL, the result is normal:
SELECT * FROM viewsortcontrol
However, if you execute the following SQL, there is no query result:
SELECT * FROM viewsortcontrol WHERE tableid= '0x8d20e'
The tableid field is the affinitykey of the table.
What are the possible reasons?
Re: [2.10]If affinityKey is used as a where condition, cannot
retrieve the result set
Posted by 38797715 <38...@qq.com>.
Yes, you are right!
在 2021/4/22 上午12:49, Igor Belyakov 写道:
> Seems like it could be related with the next issue:
> https://issues.apache.org/jira/browse/IGNITE-14451
> <https://issues.apache.org/jira/browse/IGNITE-14451>
> Which should be fixed in the 2.11 release.
>
> As workaround you can try to change fields order in the PK to the same
> which is used in the cache fields list:
>
> CREATE TABLE IF NOT EXISTS VIEWSORTCONTROL (
> TABLEID VARCHAR NOT NULL,
> ID VARCHAR,
> ...
> PRIMARY KEY (TABLEID, ID)
> )
>
> Igor
>
> On Mon, Apr 12, 2021 at 1:03 PM 38797715 <38797715@qq.com
> <ma...@qq.com>> wrote:
>
> Hi team,
>
> test.zip Is a single node snapshot compressed file.
>
> Unzip the file to the work directory of ignite, and then use the
> example.xml start a node and activate the cluster.
>
> You will see a table called viewsortcontrol.
>
> Execute the following SQL, the result is normal:
>
> SELECT * FROM viewsortcontrol
>
> However, if you execute the following SQL, there is no query result:
>
> SELECT * FROM viewsortcontrol WHERE tableid= '0x8d20e'
>
> The tableid field is the affinitykey of the table.
>
> What are the possible reasons?
>
Re: [2.10]If affinityKey is used as a where condition, cannot
retrieve the result set
Posted by Igor Belyakov <ig...@gmail.com>.
Seems like it could be related with the next issue:
https://issues.apache.org/jira/browse/IGNITE-14451
Which should be fixed in the 2.11 release.
As workaround you can try to change fields order in the PK to the same
which is used in the cache fields list:
CREATE TABLE IF NOT EXISTS VIEWSORTCONTROL (
TABLEID VARCHAR NOT NULL,
ID VARCHAR,
...
PRIMARY KEY (TABLEID, ID)
)
Igor
On Mon, Apr 12, 2021 at 1:03 PM 38797715 <38...@qq.com> wrote:
> Hi team,
>
> test.zip Is a single node snapshot compressed file.
>
> Unzip the file to the work directory of ignite, and then use the
> example.xml start a node and activate the cluster.
>
> You will see a table called viewsortcontrol.
>
> Execute the following SQL, the result is normal:
>
> SELECT * FROM viewsortcontrol
>
> However, if you execute the following SQL, there is no query result:
>
> SELECT * FROM viewsortcontrol WHERE tableid= '0x8d20e'
>
> The tableid field is the affinitykey of the table.
>
> What are the possible reasons?
>