ignite-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrey Nestrogaev <a.nestrog...@flexsoft.com>
Subject cross cache query problem
Date Tue, 09 Feb 2016 15:14:17 GMT
Hi All,

Have two caches:
demoCache - PARTITIONED, configured in config xml
entryCache - PARTITIONED, created dynamically using  CacheConfiguration and
getOrCreateCache

this work fine:
        IgniteCache<String, BinaryObject> cache = ignite.cache("entryCache
").withKeepBinary();
        SqlFieldsQuery query = new SqlFieldsQuery("select count(1) from
\"entryCache\".entryTable, \"demoCache\".demotable");
        try (QueryCursor<List&lt;?>> cursor = cache.query(query)) {
            for (List<?> row : cursor)
                System.out.println(row.get(0));
        }

this doesnt work:
        IgniteCache<String, BinaryObject> cache =
ignite.cache("*demoCache*").withKeepBinary();
        SqlFieldsQuery query = new SqlFieldsQuery("select count(1) from
\"entryCache\".entryTable, \"demoCache\".demotable");
        try (QueryCursor<List&lt;?>> cursor = cache.query(query)) {
            for (List<?> row : cursor)
                System.out.println(row.get(0));
        }

return error:
Schema "entryCache" not found; SQL statement:
select count(1) from "entryCache ".entryTable, "demoCache".demotable 


Is it important to how to create caсhe?

Thanks.





--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/cross-cache-query-problem-tp2903.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Mime
View raw message