Hi,

When you create a cache via Java API you provide a value type to the 
QueryEntity.
Then the table name for SQL queries will have a form 
<cache_name>.<value_type_name>.

Can you share the code that you use to create the caches?
Then it would be easier to tell what will be the exact names of the tables.

Thanks,
Stan


From: takumi
Sent: 7 марта 2018 г. 18:40
To: user@ignite.apache.org
Subject: How to use SqlQuery for multi tables

I want to use sql "select" from 2 caches.

For example.
  SqlQuery sql = new SqlQuery(cache1, "select a.* from cache1 a, cache2 b
where a.id = b.id");
  QueryCursor<Entry&lt;String, BinaryObject>> results = cache.query(sql);

  ※ cache1, cache2 have BinaryObject Data.
      I call QueryEntity#addQueryField("id", String.class.getName(), "id").

When above-mentioned sql execute, exception occured. It is reason cache2 is
not found.
SqlQuery has the 1st parameter which is target cache' name (=cache1).
So cache2 is not found.
How I use sql from 2 tables (cache1 and cache2)?




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

Reply via email to