ignite-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vkulichenko <valentin.kuliche...@gmail.com>
Subject Re: String comparison query in sql doesn't return any results
Date Wed, 12 Oct 2016 19:28:30 GMT

Please properly subscribe to the mailing list so that the community can
receive email notifications for your messages. To subscribe, send empty
email to user-subscribe@ignite.apache.org and follow simple instructions in
the reply.

pmazumdar wrote
> I am trying to count number of rows in ignite cache that has a particular
> string value in a column but it doesn't return any result while the data
> set has many records for that value.
> Here's what I am doing -
> String countQuery = "SELECT COUNT(*) FROM Table1 WHERE LOWER(columnName) =
> LOWER(?)";
> SqlFieldsQuery cQuery = new SqlFieldsQuery(countQuery);
> List&lt;List&lt;?&gt;> resCount =
> IgniteSession.getCache().query(cQuery.setArgs("abc")).getAll();
> return (Long) resCount.get(0).get(0);
> Am I doing something wrong here?

I can't reproduce this. Can you provide the whole test with your model
classes, configurations, code that loads the data and the data itself?


View this message in context: http://apache-ignite-users.70518.x6.nabble.com/String-comparison-query-in-sql-doesn-t-return-any-results-tp8131p8247.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

View raw message