Artem Shutak created IGNITE-539:
-----------------------------------
Summary: Implement auto detection which caches should be used to
execute SQL query
Key: IGNITE-539
URL: https://issues.apache.org/jira/browse/IGNITE-539
Project: Ignite
Issue Type: Improvement
Reporter: Artem Shutak
Assignee: Sergi Vladykin
Now, for execution of SQL query we have to have some instance of Ignite cache.
But if we want to execute cross caches SQL query with full naming of tables we
have to have some instance of cache.
For example we have 2 caches: "partitioned" (with Person and Purchase tables)
and "replicated" (with Product table). Then for execution query
select firstName, lastName, Product.name from "partitioned".Person,
"partitioned".Purchase, "replicated".Product where Person.id =
Purchase.personId and Purchase.productId = Product.id;
We have to use something like this:
ignite.jcache("partitioned").queryFields(new SqlFieldsQuery(<sql_query>));
It would be better if user have not to be care about which cache instance he
should use. And use something like it:
ignite.jcache().queryFields(new SqlFieldsQuery(<sql_query>));
or
ignite.query(<sql_query>);
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)