Mikhail Cherkasov created IGNITE-7793:

             Summary: SQL does not work if value has index filed which name 
equals to affinity key name
                 Key: IGNITE-7793
                 URL: https://issues.apache.org/jira/browse/IGNITE-7793
             Project: Ignite
          Issue Type: Bug
          Components: sql
    Affects Versions: 2.3
            Reporter: Mikhail Cherkasov
             Fix For: 2.5

SQL does not work if value has index filed which name equals to affinity key 
public class AKey {
    int a;
    public AKey(int a) {
        this.a = a;

public class AVal {
    int a;
    public AVal(int a) {
        this.a = a;

AKey aKey = new AKey(1);
AVal aVal = new AVal(0);

IgniteCache<Object, Object> cache = ignite.cache("Instrument");
cache.put(aKey, aVal);

SqlFieldsQuery query = new SqlFieldsQuery("select * from \"Instrument\".AVal it 
where it.a=?");

List<List<?>> res = cache.query(query.setArgs(0)).getAll();

if(res.isEmpty()) {
    System.out.println("!!!!!!!!! FAILED !!!!!!!!!!!");


This message was sent by Atlassian JIRA

Reply via email to