Hi, Yes, continuous queries are only predicate based and could named as "continuous listener", but for an initial query that run once we could use SQLFieldsQuery. Let try with following code: ContinuousQuery<Long,SomeValue > q= new ContinuousQuery<Long, SomeValue>(); ((ContinuousQuery)q).setInitialQuery(new SqlFieldsQuery("select _val from table")); q.setLocalListener(System.out::println); QueryCursor cursor = binaryCache.query(q); cursor.forEach(o -> { SomeValue v = (SomeValue) o; });
Thanks, Pavel 2018-03-21 17:44 GMT+03:00 au.fp2018 <au.fp2...@gmail.com>: > Thanks for your answer Pavel. > > But that does not help. 'q' is already a ContinuousQuery am I not sure what > good the additional cast does. Anyway I tried that and also explicitly > casting the initialQuery, didn't work. As I was suggesting in my first post > the types don't line-up. > > In my search I came across this on Stack Overflow: > https://stackoverflow.com/a/43076601 > > According to that reply "Continuous queries are only predicate based, SQL > is > not supported here.". But the documentation says SQL is supported. This is > very confusing and misleading. > > If only predicate based queries are supported than how can one take > advantage of the indexes in Ignite. > I would prefer SCAN queries, but without indexes my initial query is > unacceptably slow. > > Thanks in Advance. > > Thanks, > Andre > > > > > -- > Sent from: http://apache-ignite-users.70518.x6.nabble.com/ > -- Regards Pavel Vinokurov