phoenix-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] comnetwork commented on a change in pull request #431: PHOENIX-5105
Date Wed, 23 Jan 2019 02:35:50 GMT
comnetwork commented on a change in pull request #431: PHOENIX-5105
URL: https://github.com/apache/phoenix/pull/431#discussion_r250037849
 
 

 ##########
 File path: phoenix-core/src/main/java/org/apache/phoenix/compile/JoinCompiler.java
 ##########
 @@ -761,13 +761,15 @@ public Expression compilePostFilterExpression(StatementContext context)
throws S
         }
 
         public SelectStatement getAsSubquery(List<OrderByNode> orderBy) throws SQLException
{
-            if (isSubselect())
-                return SubselectRewriter.applyOrderBy(
+            if (isSubselect()) {
+                return SubselectRewriter.applyOrderByAndPostFilters(
                         SubselectRewriter.applyPostFilters(subselect, preFilters, tableNode.getAlias()),
                         orderBy,
                         tableNode.getAlias(),
-                        tableNode);
-
+                        postFilters);
+            }
+            //for table, postFilters is empty , because it can safely pushed down as preFilters.
 
 Review comment:
   Yes, the postFilters which are pushed down to JoinCompiler.Table could always be pushed
down into the subquery, I would omit the useless code to make it more clear.
   By contrast, the postFilters of JoinCompiler.JoinTable should be filtered after the join
is completed.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message