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

Hudson commented on PHOENIX-5451:
---------------------------------

SUCCESS: Integrated in Jenkins build Phoenix-4.x-HBase-1.5 #126 (See 
[https://builds.apache.org/job/Phoenix-4.x-HBase-1.5/126/])
PHOENIX-5451 Column pruning for Subselect (chenglei: rev 
5c269e6264e8b0f3f1411513abb109c1266395d9)
* (edit) phoenix-core/src/test/java/org/apache/phoenix/util/TestUtil.java
* (edit) phoenix-core/src/main/java/org/apache/phoenix/compile/FromCompiler.java
* (edit) phoenix-core/src/main/java/org/apache/phoenix/util/SchemaUtil.java
* (edit) 
phoenix-core/src/test/java/org/apache/phoenix/compile/JoinQueryCompilerTest.java
* (edit) phoenix-core/src/main/java/org/apache/phoenix/compile/JoinCompiler.java
* (edit) 
phoenix-core/src/main/java/org/apache/phoenix/parse/ParseNodeRewriter.java
* (edit) 
phoenix-core/src/test/java/org/apache/phoenix/compile/QueryCompilerTest.java
* (add) phoenix-core/src/main/java/org/apache/phoenix/util/ParseNodeUtil.java
* (edit) 
phoenix-core/src/main/java/org/apache/phoenix/compile/SubselectRewriter.java
* (edit) 
phoenix-core/src/main/java/org/apache/phoenix/optimize/QueryOptimizer.java


> Column pruning for Subselect
> ----------------------------
>
>                 Key: PHOENIX-5451
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-5451
>             Project: Phoenix
>          Issue Type: Improvement
>    Affects Versions: 4.14.2
>            Reporter: chenglei
>            Assignee: chenglei
>            Priority: Major
>             Fix For: 4.15.0, 5.1.0
>
>         Attachments: PHOENIX-5451_v1-4.x-HBase-1.4.patch, 
> PHOENIX-5451_v2-4.x-HBase-1.4.patch
>
>          Time Spent: 40m
>  Remaining Estimate: 0h
>
> Phoenix has already could prune column for single flat table query, but for 
> subselect in subquery or join, column pruning is not implemented.
> Consider following join sql :
> {code:java}
> select  a.aid,b.bid from 
>  (select aid,age from table1 where age >=11 and age<=33 order by age limit 3) 
> a inner join 
>  (select bid,code from table2 order by code limit 1) b on a.aid=b.bid 
>  {code}
> for LHS, {{table1.age}} is not referenced by outer join, and for RHS, 
> {{table2.code}} is also not referenced by outer join,  {{table1.age}} and 
> {{table2.code}} could both be pruned when executing query for LHS and RHS, 
> but now Phoenix does not prune them.
> Another example is subquery sql:
> {code:java}
> SELECT t.eid id,  t.bstr b FROM 
> (SELECT entity_id eid, a_string astr, b_string bstr  FROM table  WHERE a_byte 
> + 1 < 9 limit 2)  t ORDER BY b,id
> {code}
> for inner subselect sql, {{a_string}} is never used by outer sql, so 
> {{a_string}} could be pruned when executing query for inner subselect, but 
> now Phoenix does not prune it.
> Some existing test cases could be optimized by this patch.



--
This message was sent by Atlassian Jira
(v8.3.2#803003)

Reply via email to