[ 
https://issues.apache.org/jira/browse/PHOENIX-3382?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15607068#comment-15607068
 ] 

Hudson commented on PHOENIX-3382:
---------------------------------

FAILURE: Integrated in Jenkins build Phoenix-4.8-HBase-1.2 #41 (See 
[https://builds.apache.org/job/Phoenix-4.8-HBase-1.2/41/])
PHOENIX-3382 Query using Row Value Constructor comprised of non leading 
(jamestaylor: rev b52321d7769ea785a4336c36242497a47be711d3)
* (edit) 
phoenix-core/src/main/java/org/apache/phoenix/compile/WhereOptimizer.java
* (edit) phoenix-core/src/it/java/org/apache/phoenix/end2end/QueryMoreIT.java
* (edit) 
phoenix-core/src/test/java/org/apache/phoenix/compile/WhereOptimizerTest.java


> Query using Row Value Constructor comprised of non leading PK columns returns 
> incorrect results
> -----------------------------------------------------------------------------------------------
>
>                 Key: PHOENIX-3382
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-3382
>             Project: Phoenix
>          Issue Type: Bug
>    Affects Versions: 4.8.0
>            Reporter: Joel Palmert
>            Assignee: James Taylor
>            Priority: Critical
>             Fix For: 4.9.0, 4.8.2
>
>         Attachments: PHOENIX-3382.patch, PHOENIX-3382_wip.patch
>
>
> I'm trying to use Row Value Constructors to do paging in a query in the below 
> table:
> # TABLE #
> CREATE TABLE IF NOT EXISTS COMMUNITIES.TEST (
>     ORGANIZATION_ID CHAR(15) NOT NULL,
>     SCORE DOUBLE NOT NULL,
>     ENTITY_ID CHAR(15) NOT NULL
>     CONSTRAINT TEST_PK PRIMARY KEY (
>         ORGANIZATION_ID,
>         SCORE DESC,
>         ENTITY_ID DESC
>     )
> ) VERSIONS=1, MULTI_TENANT=TRUE, REPLICATION_SCOPE=1, TTL=43200
> UPSERT INTO COMMUNITIES.TEST VALUES ('org1',3,'01');
> UPSERT INTO COMMUNITIES.TEST VALUES ('org1',2,'04');
> UPSERT INTO COMMUNITIES.TEST VALUES ('org1',2,'03');
> UPSERT INTO COMMUNITIES.TEST VALUES ('org1',1,'02');
> # QUERY #
> SELECT entity_id, score
> FROM communities.test
> WHERE organization_id = 'org1'
> AND (score, entity_id) < (2, '04')
> ORDER BY score DESC, entity_id DESC
> LIMIT 3
> I'm specifying the score and entity_id of the second row so I'm expecting it 
> to return the 2 last values (with id 03 and 02). However, it returns the 3 
> first values (and if it wasn't for the LIMIT 3 it would just return all).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to