Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id E768E200C60 for ; Mon, 24 Apr 2017 21:00:10 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id E5FA2160BA5; Mon, 24 Apr 2017 19:00:10 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 11CF4160B99 for ; Mon, 24 Apr 2017 21:00:09 +0200 (CEST) Received: (qmail 56877 invoked by uid 500); 24 Apr 2017 19:00:09 -0000 Mailing-List: contact dev-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 dev@hive.apache.org Received: (qmail 56866 invoked by uid 99); 24 Apr 2017 19:00:09 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 24 Apr 2017 19:00:09 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id A7E60D07CA for ; Mon, 24 Apr 2017 19:00:08 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -100.002 X-Spam-Level: X-Spam-Status: No, score=-100.002 tagged_above=-999 required=6.31 tests=[RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id oWPLEoW1NHgl for ; Mon, 24 Apr 2017 19:00:07 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id E95735F3F0 for ; Mon, 24 Apr 2017 19:00:06 +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 B9539E017A for ; Mon, 24 Apr 2017 19:00:05 +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 760E320D54 for ; Mon, 24 Apr 2017 19:00:05 +0000 (UTC) Date: Mon, 24 Apr 2017 19:00:05 +0000 (UTC) From: "Sahil Takiar (JIRA)" To: dev@hive.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (HIVE-16521) HoS user level explain plan possibly incorrect for UNION clause MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Mon, 24 Apr 2017 19:00:11 -0000 Sahil Takiar created HIVE-16521: ----------------------------------- Summary: HoS user level explain plan possibly incorrect for UNION clause Key: HIVE-16521 URL: https://issues.apache.org/jira/browse/HIVE-16521 Project: Hive Issue Type: Bug Components: Spark Affects Versions: 3.0.0 Reporter: Sahil Takiar Assignee: Sahil Takiar The user-level explain plan for queries with a UNION operator look very different for HoS vs. Hive-on-Tez. Furthermore, the HoS plan looks incomplete: Query: {{EXPLAIN select count(*) from srcpart where srcpart.ds in (select max(srcpart.ds) from srcpart union all select min(srcpart.ds) from srcpart)}} Hive-on-Tez: {code} Plan optimized by CBO. Vertex dependency in root stage Reducer 2 <- Map 1 (SIMPLE_EDGE), Reducer 7 (SIMPLE_EDGE) Reducer 3 <- Reducer 2 (CUSTOM_SIMPLE_EDGE) Reducer 5 <- Map 4 (CUSTOM_SIMPLE_EDGE), Union 6 (CONTAINS) Reducer 7 <- Union 6 (SIMPLE_EDGE) Reducer 9 <- Map 8 (CUSTOM_SIMPLE_EDGE), Union 6 (CONTAINS) Stage-0 Fetch Operator limit:-1 Stage-1 Reducer 3 File Output Operator [FS_34] Group By Operator [GBY_32] (rows=1 width=8) Output:["_col0"],aggregations:["count(VALUE._col0)"] <-Reducer 2 [CUSTOM_SIMPLE_EDGE] PARTITION_ONLY_SHUFFLE [RS_31] Group By Operator [GBY_30] (rows=1 width=8) Output:["_col0"],aggregations:["count()"] Merge Join Operator [MERGEJOIN_44] (rows=1000 width=8) Conds:RS_26._col0=RS_27._col0(Inner) <-Map 1 [SIMPLE_EDGE] SHUFFLE [RS_26] PartitionCols:_col0 Select Operator [SEL_2] (rows=2000 width=184) Output:["_col0"] TableScan [TS_0] (rows=2000 width=194) default@srcpart,srcpart,Tbl:COMPLETE,Col:COMPLETE <-Reducer 7 [SIMPLE_EDGE] SHUFFLE [RS_27] PartitionCols:_col0 Group By Operator [GBY_24] (rows=1 width=184) Output:["_col0"],keys:KEY._col0 <-Union 6 [SIMPLE_EDGE] <-Reducer 5 [CONTAINS] Reduce Output Operator [RS_23] PartitionCols:_col0 Group By Operator [GBY_22] (rows=1 width=184) Output:["_col0"],keys:_col0 Filter Operator [FIL_9] (rows=1 width=184) predicate:_col0 is not null Group By Operator [GBY_7] (rows=1 width=184) Output:["_col0"],aggregations:["max(VALUE._col0)"] <-Map 4 [CUSTOM_SIMPLE_EDGE] PARTITION_ONLY_SHUFFLE [RS_6] Group By Operator [GBY_5] (rows=1 width=184) Output:["_col0"],aggregations:["max(ds)"] Select Operator [SEL_4] (rows=2000 width=194) Output:["ds"] TableScan [TS_3] (rows=2000 width=194) default@srcpart,srcpart,Tbl:COMPLETE,Col:COMPLETE <-Reducer 9 [CONTAINS] Reduce Output Operator [RS_23] PartitionCols:_col0 Group By Operator [GBY_22] (rows=1 width=184) Output:["_col0"],keys:_col0 Filter Operator [FIL_17] (rows=1 width=184) predicate:_col0 is not null Group By Operator [GBY_15] (rows=1 width=184) Output:["_col0"],aggregations:["min(VALUE._col0)"] <-Map 8 [CUSTOM_SIMPLE_EDGE] PARTITION_ONLY_SHUFFLE [RS_14] Group By Operator [GBY_13] (rows=1 width=184) Output:["_col0"],aggregations:["min(ds)"] Select Operator [SEL_12] (rows=2000 width=194) Output:["ds"] TableScan [TS_11] (rows=2000 width=194) default@srcpart,srcpart,Tbl:COMPLETE,Col:COMPLETE Dynamic Partitioning Event Operator [EVENT_43] (rows=1 width=184) Group By Operator [GBY_42] (rows=1 width=184) Output:["_col0"],keys:_col0 Select Operator [SEL_41] (rows=1 width=184) Output:["_col0"] Please refer to the previous Group By Operator [GBY_24] {code} HoS: {code} Plan optimized by CBO. Vertex dependency in root stage Reducer 10 <- Map 9 (GROUP) Reducer 11 <- Reducer 10 (GROUP), Reducer 13 (GROUP) Reducer 13 <- Map 12 (GROUP) Vertex dependency in root stage Reducer 2 <- Map 1 (PARTITION-LEVEL SORT), Reducer 6 (PARTITION-LEVEL SORT) Reducer 3 <- Reducer 2 (GROUP) Reducer 5 <- Map 4 (GROUP) Reducer 6 <- Reducer 5 (GROUP), Reducer 8 (GROUP) Reducer 8 <- Map 7 (GROUP) Stage-0 Fetch Operator limit:-1 Stage-1 Reducer 3 File Output Operator [FS_34] Group By Operator [GBY_32] (rows=1 width=8) Output:["_col0"],aggregations:["count(VALUE._col0)"] <-Reducer 2 [GROUP] GROUP [RS_31] Group By Operator [GBY_30] (rows=1 width=8) Output:["_col0"],aggregations:["count()"] Join Operator [JOIN_28] (rows=2200 width=10) condition map:[{"":"{\"type\":\"Inner\",\"left\":0,\"right\":1}"}],keys:{"0":"_col0","1":"_col0"} <-Map 1 [PARTITION-LEVEL SORT] PARTITION-LEVEL SORT [RS_26] PartitionCols:_col0 Select Operator [SEL_2] (rows=2000 width=10) Output:["_col0"] TableScan [TS_0] (rows=2000 width=10) default@srcpart,srcpart,Tbl:COMPLETE,Col:NONE <-Reducer 6 [PARTITION-LEVEL SORT] PARTITION-LEVEL SORT [RS_27] PartitionCols:_col0 Group By Operator [GBY_24] (rows=1 width=184) Output:["_col0"],keys:KEY._col0 <-Reducer 5 [GROUP] GROUP [RS_23] PartitionCols:_col0 Group By Operator [GBY_22] (rows=2 width=184) Output:["_col0"],keys:_col0 Filter Operator [FIL_9] (rows=1 width=184) predicate:_col0 is not null Group By Operator [GBY_7] (rows=1 width=184) Output:["_col0"],aggregations:["max(VALUE._col0)"] <-Map 4 [GROUP] GROUP [RS_6] Group By Operator [GBY_5] (rows=1 width=184) Output:["_col0"],aggregations:["max(ds)"] Select Operator [SEL_4] (rows=2000 width=10) Output:["ds"] TableScan [TS_3] (rows=2000 width=10) default@srcpart,srcpart,Tbl:COMPLETE,Col:NONE <-Reducer 8 [GROUP] GROUP [RS_23] PartitionCols:_col0 Group By Operator [GBY_22] (rows=2 width=184) Output:["_col0"],keys:_col0 Filter Operator [FIL_17] (rows=1 width=184) predicate:_col0 is not null Group By Operator [GBY_15] (rows=1 width=184) Output:["_col0"],aggregations:["min(VALUE._col0)"] <-Map 7 [GROUP] GROUP [RS_14] Group By Operator [GBY_13] (rows=1 width=184) Output:["_col0"],aggregations:["min(ds)"] Select Operator [SEL_12] (rows=2000 width=10) Output:["ds"] TableScan [TS_11] (rows=2000 width=10) default@srcpart,srcpart,Tbl:COMPLETE,Col:NONE Stage-2 Reducer 11 {code} The HoS plan looks incomplete, Stage-2 only contains a single empty vertex. -- This message was sent by Atlassian JIRA (v6.3.15#6346)