phoenix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel Wong (Jira)" <j...@apache.org>
Subject [jira] [Created] (PHOENIX-5885) Tighten Scan Boundary for keys with RVC and Trailing Edges
Date Wed, 06 May 2020 20:57:00 GMT
Daniel Wong created PHOENIX-5885:
------------------------------------

             Summary: Tighten Scan Boundary for keys with RVC and Trailing Edges
                 Key: PHOENIX-5885
                 URL: https://issues.apache.org/jira/browse/PHOENIX-5885
             Project: Phoenix
          Issue Type: Improvement
            Reporter: Daniel Wong


https://issues.apache.org/jira/browse/PHOENIX-5833 found that there were test cases in WhereOptimizerTest.java
where the scan boundary was tighter due to a code error.  Specifically the query:

CREATE TABLE T (A CHAR(1) NOT NULL, B CHAR(1) NOT NULL, C CHAR(1) NOT NULL, D CHAR(1) NOT
NULL CONSTRAINT PK PRIMARY KEY ( A, B, C, D))

 

SELECT * FROM T WHERE A = 'C' and (A,B,C) > ('C','B','X') and C='C'


Optimal Scan Boundary is:

['CCC' - *)

This is because we know due to key space C cannot be 'C' until after all of the keys leading
with prefix 'C','B' 

 

With fix being moved forward on in PHOENIX-5833 we generate the scan boundary of:

['CBC' - *)

That is a more involved fix that this Jira will handle.

 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Mime
View raw message