From dev-return-57975-archive-asf-public=cust-asf.ponee.io@phoenix.apache.org Wed Aug 21 08:55:04 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 [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id B01FD180607 for ; Wed, 21 Aug 2019 10:55:03 +0200 (CEST) Received: (qmail 35597 invoked by uid 500); 21 Aug 2019 08:55:02 -0000 Mailing-List: contact dev-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 dev@phoenix.apache.org Received: (qmail 35489 invoked by uid 99); 21 Aug 2019 08:55:02 -0000 Received: from mailrelay1-us-west.apache.org (HELO mailrelay1-us-west.apache.org) (209.188.14.139) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 21 Aug 2019 08:55:02 +0000 Received: from jira-he-de.apache.org (static.172.67.40.188.clients.your-server.de [188.40.67.172]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 96328E2EE6 for ; Wed, 21 Aug 2019 08:55:01 +0000 (UTC) Received: from jira-he-de.apache.org (localhost.localdomain [127.0.0.1]) by jira-he-de.apache.org (ASF Mail Server at jira-he-de.apache.org) with ESMTP id 6005C78060C for ; Wed, 21 Aug 2019 08:55:00 +0000 (UTC) Date: Wed, 21 Aug 2019 08:55:00 +0000 (UTC) From: "chenglei (Jira)" To: dev@phoenix.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Assigned] (PHOENIX-5451) Column pruning for Subselect MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/PHOENIX-5451?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] chenglei reassigned PHOENIX-5451: --------------------------------- Attachment: PHOENIX-5451_v1-4.x-HBase-1.4.patch Assignee: chenglei > 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 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 execute 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 execute 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)