You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ignite.apache.org by Dmitriy Setrakyan <ds...@apache.org> on 2017/09/04 03:21:00 UTC

Fwd: SQLQuery with simple Join return no results

Cross sending to dev@

Igniters, is there a way that we could detect whether JOIN keys are
collocated or not? If not, then the query should fail with an appropriate
error message. I understand that this may not be possible for 100% of all
JOIN queries, but even if we cover 50%, we will significantly enhance the
Ignite usability.

Thoughts?

D.

---------- Forwarded message ----------
From: matt <go...@gmail.com>
Date: Fri, Sep 1, 2017 at 1:51 PM
Subject: SQLQuery with simple Join return no results
To: user@ignite.apache.org


I have 2 caches defined, both with String keys, and classes that make use of
the Ignite annotations for indexes and affinity. I've got 3 different nodes
running, and the code I'm using to populate the cache w/test data works, and
I can see each node is updated with its share of the data. My index types
are set on the caches as well.

If I do a ScanQuery, I can see that all of the fields and IDs are correct,
Ignite returns them all. But when doing a SqlQuery, I get nothing back.
Ignite is not complaining about the query, it's just returning an empty
cursor.

If I remove the Join, results are returned.

So I'm wondering if this is related to the way I've set up my affinity
mapping. It's basically setup like the code below... and the query looks
like this:

"from B, A WHERE B.id = A.bID"

Any ideas on what I'm doing wrong here?

class A implements Serializable {
  @QuerySqlField(index = true)
  String id;

  @QuerySqlField(index = true)
  String bId;

  @AffinityKeyMapped
  @QuerySqlField(index = true)
  String group;
}

class B implements Serializable {
  @QuerySqlField(index = true)
  String id;

  @AffinityKeyMapped
  @QuerySqlField(index = true)
  String group;
}



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

Re: SQLQuery with simple Join return no results

Posted by Yakov Zhdanov <yz...@apache.org>.
We already have similar ticket -
https://issues.apache.org/jira/browse/IGNITE-5653

I suggest we prioritize it.

--Yakov