From issues-return-4169-archive-asf-public=cust-asf.ponee.io@phoenix.apache.org Wed Jan 23 15:17:05 2019 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id DED8018066C for ; Wed, 23 Jan 2019 15:17:04 +0100 (CET) Received: (qmail 13274 invoked by uid 500); 23 Jan 2019 14:17:04 -0000 Mailing-List: contact issues-help@phoenix.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@phoenix.apache.org Delivered-To: mailing list issues@phoenix.apache.org Received: (qmail 13264 invoked by uid 99); 23 Jan 2019 14:17:04 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 23 Jan 2019 14:17:04 +0000 From: GitBox To: issues@phoenix.apache.org Subject: [GitHub] comnetwork commented on a change in pull request #431: PHOENIX-5105 Message-ID: <154825302347.28780.13684342997783695915.gitbox@gitbox.apache.org> Date: Wed, 23 Jan 2019 14:17:03 -0000 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit 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 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 to subquery by wrapping as outer `whereParseNodes` , I would omit more useless code to make it more clear. By contrast, the `postFilters `of `JoinCompiler.JoinTable` should be filtered separately 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