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

James Taylor commented on PHOENIX-944:
--------------------------------------

How about for (1) if you have a common base class with the existing logic for 
GroupedAggregatingResultIterator, but with an abstract protected int 
compare(Tuple t1, Tuple t2) method? Then you can have a 
ServerGroupedAggregatingResultIterator that implements that using the row key, 
while yours would have a different implementation. This is how we handle that 
for our MergeSortResultIterator which had the same issue.

How about for (2), if you just make your inner iterator implement 
PeekingResultIterator by derive it from LookAheadResultIterator and/or wrapping 
it using LookAheadResultIterator.wrap(ResultIterator) static method?



> Support derived tables in FROM clause that needs extra steps of client-side 
> aggregation or other processing
> -----------------------------------------------------------------------------------------------------------
>
>                 Key: PHOENIX-944
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-944
>             Project: Phoenix
>          Issue Type: Bug
>    Affects Versions: 3.0.0, 4.0.0, 5.0.0
>            Reporter: Maryann Xue
>            Assignee: Maryann Xue
>             Fix For: 3.0.0, 4.0.0, 5.0.0
>
>         Attachments: 944.patch
>
>   Original Estimate: 168h
>  Remaining Estimate: 168h
>
> Groupby in both outer and inner queries cannot be flattened. We can apply an 
> extra step of client-side aggregation to handle such cases.
> See DerivedTableIT.java for all those examples that are currently not 
> supported.



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

Reply via email to