ignite-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexey Kuznetsov <akuznet...@gridgain.com>
Subject Re: SQL query question
Date Tue, 02 Jun 2015 15:43:48 GMT
After investigation this issue I found the following:

It seems that we have here a special case of Scala and Java compatibility.
In Scala it is possible to use "Int" to work with cache, and actually "Int"
in Scala compiled into primitive "int". But in Java we can not use
primitives as cache keys we could only use objects.

But also in your code you registered indexed types and Scala "Int" was taken
as primitive "int".
And when you try to insert into cache boxing take place and "Integer" type
used to update indexes.

So, I think we could handle this inside Ignite by translating primitive
types to corresponding
 object types in CacheCfg.setIndexedTypes(...) method.

I created https://issues.apache.org/jira/browse/IGNITE-983 for this.

For now you could use java.lang.Integer.
Or fix IGNITE-983 (I think it will be trivial).




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

Mime
View raw message