ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From se...@apache.org
Subject [42/46] incubator-ignite git commit: ignite-sql-tests
Date Wed, 25 Feb 2015 00:37:05 GMT
ignite-sql-tests


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/93c03ae3
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/93c03ae3
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/93c03ae3

Branch: refs/heads/ignite-sql-tests
Commit: 93c03ae33a0ceacdfc9d90c066862bdb4a30e65f
Parents: 7e5034d
Author: S.Vladykin <svladykin@gridgain.com>
Authored: Wed Feb 25 02:06:05 2015 +0300
Committer: S.Vladykin <svladykin@gridgain.com>
Committed: Wed Feb 25 02:06:05 2015 +0300

----------------------------------------------------------------------
 examples/config/example-cache.xml                                | 2 +-
 .../ignite/internal/processors/query/GridQueryProcessor.java     | 4 ++++
 2 files changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/93c03ae3/examples/config/example-cache.xml
----------------------------------------------------------------------
diff --git a/examples/config/example-cache.xml b/examples/config/example-cache.xml
index 1afb372..9b8d8b8 100644
--- a/examples/config/example-cache.xml
+++ b/examples/config/example-cache.xml
@@ -156,7 +156,7 @@
                 <value>org.apache.ignite.examples.datagrid.CacheQueryExample.Organization</value>
 
                 <!-- Key and value type for SQL table Person. -->
-                <value>java.util.UUID</value>
+                <value>org.apache.ignite.cache.affinity.CacheAffinityKey</value>
                 <value>org.apache.ignite.examples.datagrid.CacheQueryExample.Person</value>
             </list>
         </property>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/93c03ae3/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java
index 985a887..f3eee9b 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java
@@ -366,6 +366,10 @@ public class GridQueryProcessor extends GridProcessorAdapter {
                     "(multiple classes with same simple name are stored in the same cache)
" +
                     "[expCls=" + desc.valueClass().getName() + ", actualCls=" + valCls.getName()
+ ']');
 
+            if (!desc.keyClass().isAssignableFrom(key.getClass()))
+                throw new IgniteCheckedException("Failed to update index, incorrect key class
[expCls=" +
+                    desc.keyClass().getName() + ", actualCls=" + key.getClass().getName()
+ "]");
+
             idx.store(space, desc, key, val, ver, expirationTime);
         }
         finally {


Mime
View raw message