phoenix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas D'Silva (JIRA)" <j...@apache.org>
Subject [jira] [Created] (PHOENIX-5318) Slots passed to SkipScan filter is incorrect for desc primary keys that are prefixes of each other
Date Thu, 06 Jun 2019 20:52:01 GMT
Thomas D'Silva created PHOENIX-5318:
---------------------------------------

             Summary: Slots passed to SkipScan filter is incorrect for desc primary keys that
are prefixes of each other
                 Key: PHOENIX-5318
                 URL: https://issues.apache.org/jira/browse/PHOENIX-5318
             Project: Phoenix
          Issue Type: Improvement
    Affects Versions: 4.15.0, 5.1.0, 4.14.3
            Reporter: Thomas D'Silva
            Assignee: Thomas D'Silva


{code}
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 |

+-------+-------+-------+-------
{code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message