ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From voze...@apache.org
Subject [1/3] ignite git commit: IGNITE-2543: Tables look up now return tables from all caches.
Date Wed, 10 Feb 2016 14:26:40 GMT
Repository: ignite
Updated Branches:
  refs/heads/ignite-1786 67730c4d9 -> e0226fc33


IGNITE-2543: Tables look up now return tables from all caches.


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

Branch: refs/heads/ignite-1786
Commit: a383108bfe84d7552ceda94ef55a17733e715570
Parents: d55dc36
Author: isapego <isapego@gridgain.com>
Authored: Wed Feb 3 22:27:16 2016 +0300
Committer: isapego <isapego@gridgain.com>
Committed: Wed Feb 3 22:27:16 2016 +0300

----------------------------------------------------------------------
 .../processors/odbc/OdbcCommandHandler.java     | 26 ++++++++++++--------
 1 file changed, 16 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/a383108b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/OdbcCommandHandler.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/OdbcCommandHandler.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/OdbcCommandHandler.java
index 48851ca..282f384 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/OdbcCommandHandler.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/OdbcCommandHandler.java
@@ -256,20 +256,26 @@ public class OdbcCommandHandler {
 
             String realSchema = removeQuotationMarksIfNeeded(req.schema());
 
-            Collection<GridQueryTypeDescriptor> tablesMeta = ctx.query().types(realSchema);
-
-            for (GridQueryTypeDescriptor table : tablesMeta) {
-                if (!matches(table.name(), req.table()))
+            for (String cacheName : ctx.cache().cacheNames())
+            {
+                if (!matches(cacheName, realSchema))
                     continue;
 
-                if (!matches("TABLE", req.tableType()))
-                    continue;
+                Collection<GridQueryTypeDescriptor> tablesMeta = ctx.query().types(cacheName);
+
+                for (GridQueryTypeDescriptor table : tablesMeta) {
+                    if (!matches(table.name(), req.table()))
+                        continue;
+
+                    if (!matches("TABLE", req.tableType()))
+                        continue;
 
-                OdbcTableMeta tableMeta = new OdbcTableMeta(req.catalog(), req.schema(),
-                        table.name(), "TABLE");
+                    OdbcTableMeta tableMeta = new OdbcTableMeta(req.catalog(), cacheName,
+                            table.name(), "TABLE");
 
-                if (!meta.contains(tableMeta))
-                    meta.add(tableMeta);
+                    if (!meta.contains(tableMeta))
+                        meta.add(tableMeta);
+                }
             }
 
             OdbcQueryGetTablesMetaResult res = new OdbcQueryGetTablesMetaResult(meta);


Mime
View raw message