You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ignite.apache.org by "Vyacheslav Koptilin (JIRA)" <ji...@apache.org> on 2017/12/21 10:36:00 UTC

[jira] [Created] (IGNITE-7277) JDBC thin driver may list table name twice.

Vyacheslav Koptilin created IGNITE-7277:
-------------------------------------------

             Summary: JDBC thin driver may list table name twice.
                 Key: IGNITE-7277
                 URL: https://issues.apache.org/jira/browse/IGNITE-7277
             Project: Ignite
          Issue Type: Bug
          Components: jdbc, sql
    Affects Versions: 2.3
            Reporter: Vyacheslav Koptilin
            Assignee: Taras Ledkov


JDBC thin driver duplicates table name in case of using {{CacheConfiguration.setIndexedTypes()}}

{{
CacheConfiguration<?, ?> cfg = new CacheConfiguration<>("CACHE_NAME").setSqlSchema("PUBLIC");
cfg.setIndexedTypes(Long.class, Person.class);
IgniteCache<?, ?> cachePerson = ignite.getOrCreateCache(cfg);
}}

{{sqlline}} output
{{
+--------------------------------+--------------------------------+--------------------------------+--------------------------------+
|           TABLE_CAT            |          TABLE_SCHEM           |           TABLE_NAME           |           TABLE_TYPE           |
+--------------------------------+--------------------------------+--------------------------------+--------------------------------+
|                                | PUBLIC                         | CITY                           | TABLE                          |
|                                | CACHE_NAME                     | PERSON                         | TABLE                          |
|                                | CACHE_NAME                     | PERSON                         | TABLE                          |
+--------------------------------+--------------------------------+--------------------------------+--------------------------------+
}}

On the other hand, the following approach to create a table works as expected
{{
cache.query(new SqlFieldsQuery(
                "CREATE TABLE city (id LONG PRIMARY KEY, name VARCHAR) WITH \"template=partitioned\""));
}}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)