Uploaded image for project: 'Phoenix'
  1. Phoenix
  2. PHOENIX-5318

Slots passed to SkipScan filter is incorrect for desc primary keys that are prefixes of each other

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 4.15.0, 5.1.0, 4.14.3
    • 4.15.0, 5.1.0, 4.14.3
    • None

    Description

      CREATE VIEW IF NOT EXISTS CUSTOM_ENTITY."z01" (COL1 VARCHAR, COL2 VARCHAR, COL3 VARCHAR, COL4 VARCHAR CONSTRAINT PK PRIMARY KEY (COL1 DESC, COL2 DESC, COL3 DESC, COL4 DESC)) AS SELECT * FROM CUSTOM_ENTITY.CUSTOM_ENTITY_DATA_NO_ID WHERE KEY_PREFIX = 'z01'; 
      
       
      
      UPSERT INTO CUSTOM_ENTITY."z01" (COL1, COL2, COL3, COL4) VALUES ('8', 'blah', 'blah', 'blah');
      
      UPSERT INTO CUSTOM_ENTITY."z01" (COL1, COL2, COL3, COL4) VALUES ('6', 'blah', 'blah', 'blah');
      
      UPSERT INTO CUSTOM_ENTITY."z01" (COL1, COL2, COL3, COL4) VALUES ('23', 'blah', 'blah', 'blah');
      
      UPSERT INTO CUSTOM_ENTITY."z01" (COL1, COL2, COL3, COL4) VALUES ('17', 'blah', 'blah', 'blah');
      
       
      
      SELECT COL1, COL2, COL3, COL4 FROM CUSTOM_ENTITY."z01" WHERE COL4='blah' AND (COL1='1' OR COL1='2' OR COL1='3' OR COL1='4' OR COL1='5' OR COL1='6' OR COL1='8' OR COL1='17' OR COL1='12' OR COL1='23') AND COL3='blah'
      
       
      
      +-------+-------+-------+-------+
      
      | COL1 | COL2 | COL3 | COL4 |
      
      +-------+-------+-------+-------+
      
      | 8   | blah | blah | blah |
      
      | 6   | blah | blah | blah |
      
      +-------+-------+-------+-------+
      
       
      
      SELECT COL1, COL2, COL3, COL4 FROM CUSTOM_ENTITY."z01" WHERE COL4='blah' AND (COL1='6'OR COL1='8' OR COL1='17' OR COL1='12' OR COL1='23') AND COL3='blah'
      
       
      
      +-------+-------+-------+-------+
      
      | COL1 | COL2 | COL3 | COL4 |
      
      +-------+-------+-------+-------+
      
      | 8   | blah | blah | blah |
      
      | 6   | blah | blah | blah |
      
      | 23  | blah | blah | blah |
      
      | 17  | blah | blah | blah |
      
      +-------+-------+-------+-------
      

      Attachments

        1. PHOENIX-5318-4.x-HBase-1.3.patch
          8 kB
          Thomas D'Silva

        Issue Links

          Activity

            People

              tdsilva Thomas D'Silva
              tdsilva Thomas D'Silva
              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 - 1h 40m
                  1h 40m