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

puzzling select result

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 2.7.5
    • Fix Version/s: 2.7.6
    • Component/s: sql
    • Labels:
    • Environment:

      System version: CentOS Linux release 7.6.1810 (Core)
      Apache Ignite version: apache-ignite-2.7.5-1.noarch

    • Release Note:
      Fixed a bug that caused a SELECT query with an equality predicate on a part of the primary compound key to return a single row even if the query matched multiple rows
    • Ignite Flags:
      Docs Required, Release Notes Required

      Description

      select using the first primary key only returns one record, but it should return more records.
      The following is how to reproduce this problem

      1, create a table using
      CREATE TABLE IF NOT EXISTS Person(
      id int,
      city_id int,
      name varchar,
      age int,
      company varchar,
      PRIMARY KEY (id, city_id)
      );
      2, insert some records
      INSERT INTO Person (id, name, city_id) VALUES (1, 'John Doe', 3);
      INSERT INTO Person (id, name, city_id) VALUES (1, 'John Dean', 4);
      INSERT INTO Person (id, name, city_id) VALUES (2, 'Alex', 4);
      3, query using 'select * from Person' show all of the records, expected
      http://www.passimage.in/i/03da31c8f23cf64580d5.png
      4, query using 'select * from Person where id=1', only get one record, NOT expected
      http://www.passimage.in/i/f5491491a70c5d796823.png
      5, query using 'select * from Person where city_id=4' get  two records, expected
      http://www.passimage.in/i/ff0ee4f5e882983d779d.png

      Why  'select * from Person where id=1', only get one record? and how to fix this? Is there any special operations/configurations to do?

        Attachments

          Activity

            People

            • Assignee:
              Pavlukhin Ivan Pavlukhin
              Reporter:
              JerryKwan JerryKwan
            • Votes:
              1 Vote for this issue
              Watchers:
              7 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 - 50m
                50m