Hi all,
I have defined two classes in Java - one for a key and one for a value. Suppose
they look like this:
public static class Key implements Serializable {
public String a;
@QuerySqlField
@AffinityKeyMapped
public String b;
}
public static class Value implements Serializable {
@QuerySqlField
public int c;
}
I then define a distributed cache (in Java) for this key/value pair and fill it
with values (in Java).
Now, I run the following in SQL:
SELECT * FROM kv_table;
I indeed see results of all the stuff that I inserted into the cache.
However, when I try to select a certain value, it returns no results:
SELECT * FROM kv_table WHERE b = 'test';
I get expected results when filtering on any column that is not defined as
AffinityKeyMapped.
The only case where I get wrong results is for the AffinityKeyMapped column - I
always get a wrong result (most of the time zero rows, for some values I do get
one row, but I expect to see more rows). Also when I remove the
AffinityKeyMapped annotation and run my test again, everything works as
expected.
I run just a single server node and execute my query using the SQLLine tool
that Ignite ships with.
Is it possible that there is a bug in the code that handles this affinity key
mapping for SQL queries? Or am I doing something wrong here?
-Floris