From issues-return-4147-archive-asf-public=cust-asf.ponee.io@phoenix.apache.org Wed Jan 23 03:16:27 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 B38D2180771 for ; Wed, 23 Jan 2019 03:16:26 +0100 (CET) Received: (qmail 63723 invoked by uid 500); 23 Jan 2019 02:16:25 -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 63714 invoked by uid 99); 23 Jan 2019 02:16:25 -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 02:16:25 +0000 From: GitBox To: issues@phoenix.apache.org Subject: [GitHub] comnetwork commented on a change in pull request #431: PHOENIX-5105 Message-ID: <154820978530.25205.14452887720211548053.gitbox@gitbox.apache.org> Date: Wed, 23 Jan 2019 02:16:25 -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_r250034819 ########## File path: phoenix-core/src/main/java/org/apache/phoenix/compile/SubselectRewriter.java ########## @@ -70,12 +69,126 @@ public static boolean isPostFilterConvertible(SelectStatement statement) throws return statement.getLimit() == null && (!statement.isAggregate() || !statement.getGroupBy().isEmpty()); } - public static SelectStatement applyOrderBy(SelectStatement statement, List orderBy, String subqueryAlias,TableNode tableNode) throws SQLException { - if (orderBy == null) - return statement; - - return new SubselectRewriter(null, statement.getSelect(), subqueryAlias).applyOrderBy(statement, orderBy, tableNode); - } + /** + *
+     * only append orderByNodes and postFilters, the optimization is left to {@link #flatten(SelectStatement, SelectStatement)}.
+     * an example is rewrite
+     * SELECT  REVERSE(LOC_ID),"supplier_id",NAME FROM SUPPLIERTABLE  LIMIT 5
 
 Review comment:
   Sorry, in the above comments I did not include the "orderByNodes " and "postFilterParseNodes" parameters,  I would supplement them.

----------------------------------------------------------------
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