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

Primary index can be created with fields sequence differ from declared.

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.7.6, 2.8.1
    • 2.9
    • sql
    • None
    • fix an issue when primary key was created with invalid fields order
    • Release Notes Required

    Description

      Steps to reproduce:

      Execute the following DDL (create table + create index):

      CREATE TABLE IF NOT EXISTS Workspace (
          id UUID NOT NULL,
          accountId UUID NOT NULL,
          jsonModel VARCHAR,
          PRIMARY KEY (accountId, id)
        ) WITH "template=partitioned,atomicity=transactional,key_type=org.gridgain.gmc.dto.workspace.WorkspaceKey,value_type=workspace.Workspace,cache_name=WorkspaceCache";
      
      CREATE INDEX IF NOT EXISTS workspace_id_account_id_idx ON Workspace (id, accountId);
      

      On node start got the following warning:

      Index with the given set or subset of columns already exists (consider dropping either new or existing index) [cacheName=WorkspaceCache, schemaName=PUBLIC, tableName=WORKSPACE, newIndexName=WORKSPACE_ID_ACCOUNT_ID_IDX, existingIndexName=_key_PK, existingIndexColumns=[ID, ACCOUNTID]]
      

      But PK and index have different order!

      Attachments

        Issue Links

          Activity

            People

              zstan Evgeny Stanilovsky
              zstan Evgeny Stanilovsky
              Taras Ledkov Taras Ledkov
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 0.5h
                  0.5h