From issues-return-151538-archive-asf-public=cust-asf.ponee.io@hive.apache.org Mon Mar 4 22:16: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 [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id A0F3C180627 for ; Mon, 4 Mar 2019 23:16:03 +0100 (CET) Received: (qmail 75694 invoked by uid 500); 4 Mar 2019 22:16:02 -0000 Mailing-List: contact issues-help@hive.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hive.apache.org Delivered-To: mailing list issues@hive.apache.org Received: (qmail 75685 invoked by uid 99); 4 Mar 2019 22:16:02 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 04 Mar 2019 22:16:02 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 6F548184AAF for ; Mon, 4 Mar 2019 22:16:02 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -110.301 X-Spam-Level: X-Spam-Status: No, score=-110.301 tagged_above=-999 required=6.31 tests=[ENV_AND_HDR_SPF_MATCH=-0.5, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, USER_IN_DEF_SPF_WL=-7.5, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id tBjpxtpYQmEm for ; Mon, 4 Mar 2019 22:16:01 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 2C5965FDA6 for ; Mon, 4 Mar 2019 22:16:01 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 7BB76E2820 for ; Mon, 4 Mar 2019 22:16:00 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 2666125721 for ; Mon, 4 Mar 2019 22:16:00 +0000 (UTC) Date: Mon, 4 Mar 2019 22:16:00 +0000 (UTC) From: "Vineet Garg (JIRA)" To: issues@hive.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (HIVE-21340) CBO: Prune non-key columns feeding into a SemiJoin 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/HIVE-21340?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Vineet Garg updated HIVE-21340: ------------------------------- Component/s: Query Planning > CBO: Prune non-key columns feeding into a SemiJoin > -------------------------------------------------- > > Key: HIVE-21340 > URL: https://issues.apache.org/jira/browse/HIVE-21340 > Project: Hive > Issue Type: Bug > Components: CBO, Query Planning > Affects Versions: 4.0.0 > Reporter: Gopal V > Assignee: Vineet Garg > Priority: Major > Attachments: HIVE-21340.1.patch, HIVE-21340.2.patch > > > {code} > explain cbo > with ss as > (select count(1), ss_item_sk, ss_ticket_number from > store_sales group by ss_item_sk, ss_ticket_number > having count(1) > 1) > select count(1) from item where i_item_sk IN (select ss_item_sk from ss); > {code} > Notice the {{HiveProject(ss_item_sk=[$0], ss_ticket_number=[$1], $f2=[$2])}} > Only ss_item_sk is relevant for the HiveSemiJoin > {code} > CBO PLAN: > HiveAggregate(group=[{}], agg#0=[count()]) > HiveSemiJoin(condition=[=($0, $1)], joinType=[inner]) > HiveProject(i_item_sk=[$0]) > HiveFilter(condition=[IS NOT NULL($0)]) > HiveTableScan(table=[[tpcds_copy_orc_partitioned_10000, item]], table:alias=[item]) > HiveProject(ss_item_sk=[$0], ss_ticket_number=[$1], $f2=[$2]) > HiveFilter(condition=[>($2, 1)]) > HiveAggregate(group=[{1, 8}], agg#0=[count()]) > HiveFilter(condition=[IS NOT NULL($1)]) > HiveTableScan(table=[[tpcds_copy_orc_partitioned_10000, store_sales]], table:alias=[store_sales]) > {code} -- This message was sent by Atlassian JIRA (v7.6.3#76005)