You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@phoenix.apache.org by "Maryann Xue (JIRA)" <ji...@apache.org> on 2014/10/20 17:37:33 UTC

[jira] [Updated] (PHOENIX-944) Support derived tables in FROM clause that needs extra steps of client-side aggregation or other processing

     [ https://issues.apache.org/jira/browse/PHOENIX-944?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Maryann Xue updated PHOENIX-944:
--------------------------------
    Attachment: 944.patch

This is a non-parallel pure client solution.
For group-by in outer query, we first sort the inner query result with group-by keys so that we don't have to deal unordered group-by.
But meanwhile we pass in the inner-query information to TrackOrderPreservingExpressionCompiler when compiling the outer group-by, so that it can also be aware of inner query row keys (and it also works with inner group-by where row key becomes the group key). For example, "select ... from (select .. from XX group by a, b) group by a" will omit that sorting step and go directly into client-group-aggregation iterator.

This patch also makes the last any/all comparison correlated sub-query case pass, whose inner query has a group-by clause. This will be translated as a join query with one join table having two-level group-bys, just like the above example.

> 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)