Uploaded image for project: 'Ignite'
  1. Ignite
  2. IGNITE-7277

JDBC thin driver may list table name twice.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.3
    • 2.4
    • jdbc, sql
    • None

    Description

      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                         | PERSON                         | TABLE                          |
      |                                | PUBLIC                         | 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\""));
      

      Initial discussion on SO: https://stackoverflow.com/questions/47869429/duplicate-table-show-using-table-in-sqlline-sh

      Attachments

        Activity

          People

            tledkov-gridgain Taras Ledkov
            slava.koptilin Vyacheslav Koptilin
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: