You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@phoenix.apache.org by "Daniel Wong (Jira)" <ji...@apache.org> on 2020/05/06 20:57:00 UTC

[jira] [Created] (PHOENIX-5885) Tighten Scan Boundary for keys with RVC and Trailing Edges

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)