[
https://issues.apache.org/jira/browse/PHOENIX-136?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13977831#comment-13977831
]
Hudson commented on PHOENIX-136:
--------------------------------
SUCCESS: Integrated in Phoenix-3.0 #71 (See
[https://builds.apache.org/job/Phoenix-3.0/71/])
PHOENIX-136 Support derived tables (maryannxue: rev
a20f2790b00c13ba19f96d989d31a07e0610b404)
* phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixStatement.java
* phoenix-core/src/main/java/org/apache/phoenix/parse/ParseNodeRewriter.java
* phoenix-core/src/main/java/org/apache/phoenix/parse/HintNode.java
* phoenix-core/src/main/java/org/apache/phoenix/compile/JoinCompiler.java
* phoenix-core/src/it/java/org/apache/phoenix/end2end/HashJoinIT.java
*
phoenix-core/src/main/java/org/apache/phoenix/compile/IndexStatementRewriter.java
* phoenix-core/src/main/java/org/apache/phoenix/compile/UpsertCompiler.java
* phoenix-core/src/main/antlr3/PhoenixSQL.g
* phoenix-core/src/it/java/org/apache/phoenix/end2end/DerivedTableIT.java
*
phoenix-core/src/test/java/org/apache/phoenix/compile/JoinQueryCompilerTest.java
* phoenix-core/src/main/java/org/apache/phoenix/compile/LimitCompiler.java
* phoenix-core/src/main/java/org/apache/phoenix/compile/SubselectRewriter.java
* phoenix-core/src/main/java/org/apache/phoenix/compile/QueryCompiler.java
* phoenix-core/src/main/java/org/apache/phoenix/compile/FromCompiler.java
> Support derived tables
> ----------------------
>
> Key: PHOENIX-136
> URL: https://issues.apache.org/jira/browse/PHOENIX-136
> Project: Phoenix
> Issue Type: Task
> Reporter: James Taylor
> Assignee: James Taylor
> Labels: enhancement
>
> Add support for derived queries of the form:
> SELECT * FROM ( SELECT company, revenue FROM Company ORDER BY revenue) LIMIT
> 10
> Adding support for this requires a compile time change as well as a runtime
> execution change. The first version of the compile-time change could limit
> aggregation to only be allowed in the inner or the outer query, but not both.
> In this case, the inner and outer queries can be combined into a single query
> with the outer select becoming just a remapping of a subset of the projection
> from the inner select. The second version of the compile-time change could
> handle aggregation in the inner and outer select by performing client side
> (this is likely a less common scenario).
> For the runtime execution, change the UngroupedAggregateRegionObserver would
> be modified to look for a new "TopNLimit" attribute with an int value in the
> Scan. This would control the maximum number of values for the coprocessor to
> hold on to as the scan is performed. Then the
> GroupedAggregatingResultIterator would be modified to handle keeping the topN
> values received back from all the child iterators.
--
This message was sent by Atlassian JIRA
(v6.2#6252)