[jira] [Commented] (PHOENIX-3491) OrderBy can not be compiled out if GroupBy is not orderPreserving and OrderBy is reverse

2016-12-30 Thread chenglei (JIRA)

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

chenglei commented on PHOENIX-3491:
---

[~jamestaylor],I noticed this patch was pushed to master branch and included in 
4.9.0,Could you please close this issue and mark it resolved ?

> OrderBy can not be compiled out if GroupBy is not orderPreserving and OrderBy 
> is reverse
> 
>
> Key: PHOENIX-3491
> URL: https://issues.apache.org/jira/browse/PHOENIX-3491
> Project: Phoenix
>  Issue Type: Improvement
>Affects Versions: 4.8.0
>Reporter: chenglei
>Assignee: chenglei
> Attachments: PHOENIX-3491_v1.patch, PHOENIX-3491_v2.patch
>
>
> for the following table:
> {code:borderStyle=solid}
> CREATE TABLE ORDERBY_TEST ( 
> ORGANIZATION_ID INTEGER NOT NULL,
> CONTAINER_ID INTEGER NOT NULL,
> SCORE INTEGER NOT NULL,
> ENTITY_ID INTEGER NOT NULL, 
>CONSTRAINT TEST_PK PRIMARY KEY ( 
> ORGANIZATION_ID,
> CONTAINER_ID,
> SCORE,
> ENTITY_ID
> ));
>  {code}   
>   
> If we execute explain on the following sql: 
> {code:borderStyle=solid}   
> SELECT ORGANIZATION_ID,SCORE FROM ORDERBY_TEST  GROUP BY ORGANIZATION_ID, 
> SCORE ORDER BY ORGANIZATION_ID DESC, SCORE DESC 
> {code}
> the result is :
> {code:borderStyle=solid} 
> --+
> | PLAN |
> +--+
> | CLIENT 1-CHUNK PARALLEL 1-WAY FULL SCAN OVER ORDERBY_TEST|
> | SERVER FILTER BY FIRST KEY ONLY  |
> | SERVER AGGREGATE INTO DISTINCT ROWS BY [ORGANIZATION_ID, SCORE]  |
> | CLIENT MERGE SORT|
> | CLIENT SORTED BY [ORGANIZATION_ID DESC, SCORE DESC]  |
> +--+
> {code} 
> from the above explain result, we can see that the ORDER BY ORGANIZATION_ID 
> DESC, SCORE DESC is not  compiled out,but obviously it should be compiled out 
>  as OrderBy.REV_ROW_KEY_ORDER_BY.



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


[jira] [Commented] (PHOENIX-3491) OrderBy can not be compiled out if GroupBy is not orderPreserving and OrderBy is reverse

2016-11-23 Thread Hadoop QA (JIRA)

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

Hadoop QA commented on PHOENIX-3491:


{color:red}-1 overall{color}.  Here are the results of testing the latest 
attachment 
  http://issues.apache.org/jira/secure/attachment/12839618/PHOENIX-3491_v2.patch
  against master branch at commit e19c1734ea5aa0c0ee0e887c283a4712eb2dc803.
  ATTACHMENT ID: 12839618

{color:green}+1 @author{color}.  The patch does not contain any @author 
tags.

{color:green}+1 tests included{color}.  The patch appears to include 3 new 
or modified tests.

{color:red}-1 patch{color}.  The patch command could not apply the patch.

Console output: 
https://builds.apache.org/job/PreCommit-PHOENIX-Build/681//console

This message is automatically generated.

> OrderBy can not be compiled out if GroupBy is not orderPreserving and OrderBy 
> is reverse
> 
>
> Key: PHOENIX-3491
> URL: https://issues.apache.org/jira/browse/PHOENIX-3491
> Project: Phoenix
>  Issue Type: Improvement
>Affects Versions: 4.8.0
>Reporter: chenglei
>Assignee: chenglei
> Attachments: PHOENIX-3491_v1.patch, PHOENIX-3491_v2.patch
>
>
> for the following table:
> {code:borderStyle=solid}
> CREATE TABLE ORDERBY_TEST ( 
> ORGANIZATION_ID INTEGER NOT NULL,
> CONTAINER_ID INTEGER NOT NULL,
> SCORE INTEGER NOT NULL,
> ENTITY_ID INTEGER NOT NULL, 
>CONSTRAINT TEST_PK PRIMARY KEY ( 
> ORGANIZATION_ID,
> CONTAINER_ID,
> SCORE,
> ENTITY_ID
> ));
>  {code}   
>   
> If we execute explain on the following sql: 
> {code:borderStyle=solid}   
> SELECT ORGANIZATION_ID,SCORE FROM ORDERBY_TEST  GROUP BY ORGANIZATION_ID, 
> SCORE ORDER BY ORGANIZATION_ID DESC, SCORE DESC 
> {code}
> the result is :
> {code:borderStyle=solid} 
> --+
> | PLAN |
> +--+
> | CLIENT 1-CHUNK PARALLEL 1-WAY FULL SCAN OVER ORDERBY_TEST|
> | SERVER FILTER BY FIRST KEY ONLY  |
> | SERVER AGGREGATE INTO DISTINCT ROWS BY [ORGANIZATION_ID, SCORE]  |
> | CLIENT MERGE SORT|
> | CLIENT SORTED BY [ORGANIZATION_ID DESC, SCORE DESC]  |
> +--+
> {code} 
> from the above explain result, we can see that the ORDER BY ORGANIZATION_ID 
> DESC, SCORE DESC is not  compiled out,but obviously it should be compiled out 
>  as OrderBy.REV_ROW_KEY_ORDER_BY.



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


[jira] [Commented] (PHOENIX-3491) OrderBy can not be compiled out if GroupBy is not orderPreserving and OrderBy is reverse

2016-11-18 Thread chenglei (JIRA)

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

chenglei commented on PHOENIX-3491:
---

[~jamestaylor],because I have time difference with you,sorry for late 
response,yes ,I ran the all the existing unit tests and IT tests in my local 
machine,seems the  https://builds.apache.org/job/PreCommit-PHOENIX-Build/   is 
hanging.

> OrderBy can not be compiled out if GroupBy is not orderPreserving and OrderBy 
> is reverse
> 
>
> Key: PHOENIX-3491
> URL: https://issues.apache.org/jira/browse/PHOENIX-3491
> Project: Phoenix
>  Issue Type: Improvement
>Affects Versions: 4.8.0
>Reporter: chenglei
>Assignee: chenglei
> Attachments: PHOENIX-3491_v1.patch, PHOENIX-3491_v2.patch
>
>
> for the following table:
> {code:borderStyle=solid}
> CREATE TABLE ORDERBY_TEST ( 
> ORGANIZATION_ID INTEGER NOT NULL,
> CONTAINER_ID INTEGER NOT NULL,
> SCORE INTEGER NOT NULL,
> ENTITY_ID INTEGER NOT NULL, 
>CONSTRAINT TEST_PK PRIMARY KEY ( 
> ORGANIZATION_ID,
> CONTAINER_ID,
> SCORE,
> ENTITY_ID
> ));
>  {code}   
>   
> If we execute explain on the following sql: 
> {code:borderStyle=solid}   
> SELECT ORGANIZATION_ID,SCORE FROM ORDERBY_TEST  GROUP BY ORGANIZATION_ID, 
> SCORE ORDER BY ORGANIZATION_ID DESC, SCORE DESC 
> {code}
> the result is :
> {code:borderStyle=solid} 
> --+
> | PLAN |
> +--+
> | CLIENT 1-CHUNK PARALLEL 1-WAY FULL SCAN OVER ORDERBY_TEST|
> | SERVER FILTER BY FIRST KEY ONLY  |
> | SERVER AGGREGATE INTO DISTINCT ROWS BY [ORGANIZATION_ID, SCORE]  |
> | CLIENT MERGE SORT|
> | CLIENT SORTED BY [ORGANIZATION_ID DESC, SCORE DESC]  |
> +--+
> {code} 
> from the above explain result, we can see that the ORDER BY ORGANIZATION_ID 
> DESC, SCORE DESC is not  compiled out,but obviously it should be compiled out 
>  as OrderBy.REV_ROW_KEY_ORDER_BY.



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


[jira] [Commented] (PHOENIX-3491) OrderBy can not be compiled out if GroupBy is not orderPreserving and OrderBy is reverse

2016-11-18 Thread Hudson (JIRA)

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

Hudson commented on PHOENIX-3491:
-

SUCCESS: Integrated in Jenkins build Phoenix-master #1507 (See 
[https://builds.apache.org/job/Phoenix-master/1507/])
PHOENIX-3491 OrderBy can not be compiled out if GroupBy is not (jamestaylor: 
rev 9109026240ef0a0ece534f0b625a34c49be44568)
* (edit) phoenix-core/src/it/java/org/apache/phoenix/end2end/OrderByIT.java
* (edit) 
phoenix-core/src/main/java/org/apache/phoenix/compile/OrderPreservingTracker.java
* (edit) 
phoenix-core/src/test/java/org/apache/phoenix/compile/QueryCompilerTest.java
* (edit) 
phoenix-core/src/main/java/org/apache/phoenix/execute/AggregatePlan.java


> OrderBy can not be compiled out if GroupBy is not orderPreserving and OrderBy 
> is reverse
> 
>
> Key: PHOENIX-3491
> URL: https://issues.apache.org/jira/browse/PHOENIX-3491
> Project: Phoenix
>  Issue Type: Improvement
>Affects Versions: 4.8.0
>Reporter: chenglei
>Assignee: chenglei
> Attachments: PHOENIX-3491_v1.patch, PHOENIX-3491_v2.patch
>
>
> for the following table:
> {code:borderStyle=solid}
> CREATE TABLE ORDERBY_TEST ( 
> ORGANIZATION_ID INTEGER NOT NULL,
> CONTAINER_ID INTEGER NOT NULL,
> SCORE INTEGER NOT NULL,
> ENTITY_ID INTEGER NOT NULL, 
>CONSTRAINT TEST_PK PRIMARY KEY ( 
> ORGANIZATION_ID,
> CONTAINER_ID,
> SCORE,
> ENTITY_ID
> ));
>  {code}   
>   
> If we execute explain on the following sql: 
> {code:borderStyle=solid}   
> SELECT ORGANIZATION_ID,SCORE FROM ORDERBY_TEST  GROUP BY ORGANIZATION_ID, 
> SCORE ORDER BY ORGANIZATION_ID DESC, SCORE DESC 
> {code}
> the result is :
> {code:borderStyle=solid} 
> --+
> | PLAN |
> +--+
> | CLIENT 1-CHUNK PARALLEL 1-WAY FULL SCAN OVER ORDERBY_TEST|
> | SERVER FILTER BY FIRST KEY ONLY  |
> | SERVER AGGREGATE INTO DISTINCT ROWS BY [ORGANIZATION_ID, SCORE]  |
> | CLIENT MERGE SORT|
> | CLIENT SORTED BY [ORGANIZATION_ID DESC, SCORE DESC]  |
> +--+
> {code} 
> from the above explain result, we can see that the ORDER BY ORGANIZATION_ID 
> DESC, SCORE DESC is not  compiled out,but obviously it should be compiled out 
>  as OrderBy.REV_ROW_KEY_ORDER_BY.



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


[jira] [Commented] (PHOENIX-3491) OrderBy can not be compiled out if GroupBy is not orderPreserving and OrderBy is reverse

2016-11-18 Thread James Taylor (JIRA)

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

James Taylor commented on PHOENIX-3491:
---

Really excellent work, [~comnetwork]. The tests are very thorough. Did you get 
a chance to run all unit and IT tests as well?

> OrderBy can not be compiled out if GroupBy is not orderPreserving and OrderBy 
> is reverse
> 
>
> Key: PHOENIX-3491
> URL: https://issues.apache.org/jira/browse/PHOENIX-3491
> Project: Phoenix
>  Issue Type: Improvement
>Affects Versions: 4.8.0
>Reporter: chenglei
>Assignee: chenglei
> Attachments: PHOENIX-3491_v1.patch
>
>
> for the following table:
> {code:borderStyle=solid}
> CREATE TABLE ORDERBY_TEST ( 
> ORGANIZATION_ID INTEGER NOT NULL,
> CONTAINER_ID INTEGER NOT NULL,
> SCORE INTEGER NOT NULL,
> ENTITY_ID INTEGER NOT NULL, 
>CONSTRAINT TEST_PK PRIMARY KEY ( 
> ORGANIZATION_ID,
> CONTAINER_ID,
> SCORE,
> ENTITY_ID
> ));
>  {code}   
>   
> If we execute explain on the following sql: 
> {code:borderStyle=solid}   
> SELECT ORGANIZATION_ID,SCORE FROM ORDERBY_TEST  GROUP BY ORGANIZATION_ID, 
> SCORE ORDER BY ORGANIZATION_ID DESC, SCORE DESC 
> {code}
> the result is :
> {code:borderStyle=solid} 
> --+
> | PLAN |
> +--+
> | CLIENT 1-CHUNK PARALLEL 1-WAY FULL SCAN OVER ORDERBY_TEST|
> | SERVER FILTER BY FIRST KEY ONLY  |
> | SERVER AGGREGATE INTO DISTINCT ROWS BY [ORGANIZATION_ID, SCORE]  |
> | CLIENT MERGE SORT|
> | CLIENT SORTED BY [ORGANIZATION_ID DESC, SCORE DESC]  |
> +--+
> {code} 
> from the above explain result, we can see that the ORDER BY ORGANIZATION_ID 
> DESC, SCORE DESC is not  compiled out,but obviously it should be compiled out 
>  as OrderBy.REV_ROW_KEY_ORDER_BY.



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