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

ASF GitHub Bot commented on PHOENIX-6507:
-----------------------------------------

comnetwork opened a new pull request #1262:
URL: https://github.com/apache/phoenix/pull/1262


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


> DistinctAggregatingResultIterator should keep original tuple order of the 
> AggregatingResultIterator
> ---------------------------------------------------------------------------------------------------
>
>                 Key: PHOENIX-6507
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-6507
>             Project: Phoenix
>          Issue Type: Bug
>    Affects Versions: 4.16.1, 5.1.2
>            Reporter: chenglei
>            Assignee: chenglei
>            Priority: Major
>             Fix For: 4.17.0, 5.2.0
>
>
> Given following tables :
> {code:java}
>    create table test ( 
>       pk1 varchar not null , 
>       pk2 varchar not null, 
>       pk3 varchar not null,
>        v1 varchar, 
>        v2 varchar, 
>       CONSTRAINT TEST_PK PRIMARY KEY ( pk1,pk2,pk3))
> {code}
> The result of the following sql may be incorrect:
> {code:java}
>    select distinct pk1,max(v1) from test group by pk1,pk2,pk3 order by pk1
> {code}
> The problem is the {{order by}} is complied out because it is the prefix of 
> the {{group by}}, but for {{distinct}},  
> {{DistinctAggregatingResultIterator}} using {{HashSet}} to rearrange the 
> aggregated tuples.



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

Reply via email to