Hi,

Could you share a runnable example, that demonstrates the issue, over GitHub
or some other way?

For me it's unclear how readThrough or writeThrough can affect a result of a
SQL query having in mind that the full data set has already been loaded from
the storage and the data set is not being changed while queries are being
executed. This is exactly your case, correct?

As an example to can refer to CacheDummyStoreExample. However you need to
modify it a bit:

1) Activate indexing for the cache used in the example
cacheCfg.setIndexedTypes(Long.class, Person.class);

2) Add and call the following function

    private static void personsQuery() {
        IgniteCache<Integer, Person> cache =
            Ignition.ignite().cache("CacheDummyStoreExample");

        String sql = "select * from Person";

        QueryCursor<Cache.Entry&lt;Integer, Person>> cursor =
            cache.query(new SqlQuery<Integer,
                            Person>(Person.class, sql));

        List<Cache.Entry&lt;Integer, Person>> cursResult = cursor.getAll();

        System.out.println("size persons = " + cursResult.size());
    }

--
Denis



--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/Not-able-to-perform-cache-queries-tp2067p2092.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Reply via email to