[ 
https://issues.apache.org/jira/browse/IGNITE-7277?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16318621#comment-16318621
 ] 

ASF GitHub Bot commented on IGNITE-7277:
----------------------------------------

GitHub user tledkov-gridgain opened a pull request:

    https://github.com/apache/ignite/pull/3341

    IGNITE-7277: override equals() & hashCode() methods for JdbcTableMeta…

    … to prevent tables duplication at the tables metadata result set.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/gridgain/apache-ignite ignite-7277

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/ignite/pull/3341.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #3341
    
----
commit ab93df250dcbe3b15c65d757e9d8746aa6ce9c8a
Author: tledkov-gridgain <tledkov@...>
Date:   2018-01-09T15:41:36Z

    IGNITE-7277: override equals() & hashCode() methods for JdbcTableMeta to 
prevent tables duplication at the tables metadata result set.

----


> 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
>             Fix For: 2.4
>
>
> JDBC thin driver duplicates table name in case of using 
> {{CacheConfiguration.setIndexedTypes()}}
> {code}
>     CacheConfiguration<?, ?> cfg = new 
> CacheConfiguration<>("CACHE_NAME").setSqlSchema("PUBLIC");
>     cfg.setIndexedTypes(Long.class, Person.class);
>     IgniteCache<?, ?> cachePerson = ignite.getOrCreateCache(cfg);
> {code}
> {code:title=sqlline output|borderStyle=solid}
> +--------------------------------+--------------------------------+--------------------------------+--------------------------------+
> |           TABLE_CAT            |          TABLE_SCHEM           |           
> TABLE_NAME           |           TABLE_TYPE           |
> +--------------------------------+--------------------------------+--------------------------------+--------------------------------+
> |                                | PUBLIC                         | PERSON    
>                      | TABLE                          |
> |                                | PUBLIC                         | PERSON    
>                      | TABLE                          |
> +--------------------------------+--------------------------------+--------------------------------+--------------------------------+
> {code}
> On the other hand, the following approach to create a table works as expected
> {code}
>     cache.query(new SqlFieldsQuery(
>                 "CREATE TABLE city (id LONG PRIMARY KEY, name VARCHAR) WITH 
> \"template=partitioned\""));
> {code}
> Initial discussion on SO: 
> https://stackoverflow.com/questions/47869429/duplicate-table-show-using-table-in-sqlline-sh



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

Reply via email to