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

Hadoop QA commented on PHOENIX-5451:
------------------------------------

{color:red}-1 overall{color}.  Here are the results of testing the latest 
attachment 
  
http://issues.apache.org/jira/secure/attachment/12978153/PHOENIX-5451_v1-4.x-HBase-1.4.patch
  against 4.x-HBase-1.4 branch at commit 
4e65c902539be485ef911cd3f4e6dd726672c9c5.
  ATTACHMENT ID: 12978153

    {color:green}+1 @author{color}.  The patch does not contain any @author 
tags.

    {color:green}+1 tests included{color}.  The patch appears to include 18 new 
or modified tests.

    {color:green}+1 javac{color}.  The applied patch does not increase the 
total number of javac compiler warnings.

    {color:red}-1 release audit{color}.  The applied patch generated 1 release 
audit warnings (more than the master's current 0 warnings).

    {color:red}-1 lineLengths{color}.  The patch introduces the following lines 
longer than 100:
    +        public TableRef refreshDerivedTableNode(DerivedTableNode 
derivedTableNode) throws SQLException {
+            this.filterCanPushDownToSubselect = 
SubselectRewriter.isFilterCanPushDownToSelect(subselect);
+         * Note: If some columns are pruned, the {@link 
JoinCompiler#origResolver} should be refreshed.
+                    String normalizedColumnName = 
SchemaUtil.getNormalizedColumnName(columnParseNode);
+            //for flat table, postFilters is empty , because it can safely 
pushed down as preFilters.
+     * Note: the preFilterParseNodes parameter must have already been 
rewritten by {@link #rewritePreFilterForSubselect}.
+        return NODE_FACTORY.select(subselectStatement, 
subselectStatement.getWhere(), combine(newFilterParseNodes));
+    public static ParseNode rewritePreFilterForSubselect(ParseNode 
preFilterParseNode, SelectStatement subselectStatement, String subselectAlias) 
throws SQLException {
+    public static boolean isFilterCanPushDownToSelect(SelectStatement 
statement) throws SQLException {
+     * Only append orderByNodes and postFilters, the optimization is left to 
{@link #flatten(SelectStatement, SelectStatement)}.

    {color:green}+1 core tests{color}.  The patch passed unit tests in .

Test results: 
https://builds.apache.org/job/PreCommit-PHOENIX-Build/2920//testReport/
Release audit warnings: 
https://builds.apache.org/job/PreCommit-PHOENIX-Build/2920//artifact/patchprocess/patchReleaseAuditWarnings.txt
Console output: 
https://builds.apache.org/job/PreCommit-PHOENIX-Build/2920//console

This message is automatically generated.

> 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
>
>          Time Spent: 10m
>  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