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 B0DB7200C6C for ; Fri, 21 Apr 2017 03:30:11 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id AF447160BB1; Fri, 21 Apr 2017 01:30:11 +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 D40B5160BB0 for ; Fri, 21 Apr 2017 03:30:10 +0200 (CEST) Received: (qmail 97600 invoked by uid 500); 21 Apr 2017 01:30:10 -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 97565 invoked by uid 99); 21 Apr 2017 01:30:09 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 21 Apr 2017 01:30:09 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id AE06A1A041A for ; Fri, 21 Apr 2017 01:30:08 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-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 (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id mhxdhy-jZtLZ for ; Fri, 21 Apr 2017 01:30: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 851B85FC54 for ; Fri, 21 Apr 2017 01:30: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 5C42DE0BFB for ; Fri, 21 Apr 2017 01:30: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 B208021B56 for ; Fri, 21 Apr 2017 01:30:04 +0000 (UTC) Date: Fri, 21 Apr 2017 01:30:04 +0000 (UTC) From: "Sahil Takiar (JIRA)" To: issues@hive.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HIVE-11133) Support hive.explain.user for Spark MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Fri, 21 Apr 2017 01:30:11 -0000 [ https://issues.apache.org/jira/browse/HIVE-11133?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15977912#comment-15977912 ] Sahil Takiar commented on HIVE-11133: ------------------------------------- The qtest in the patch has a very similar query: {code} select sum(hash(a.k1,a.v1,a.k2, a.v2)) from ( select src1.key as k1, src1.value as v1, src2.key as k2, src2.value as v2 FROM (select * FROM src WHERE src.key < 10) src1 JOIN (select * FROM src WHERE src.key < 10) src2 SORT BY k1, v1, k2, v2 ) a {code} It's also a mapjoin. The user-level explain output is: {code} Plan not optimized by CBO. Vertex dependency in root stage Reducer 2 <- Map 1 (PARTITION-LEVEL SORT) Reducer 3 <- Reducer 2 (GROUP) Stage-0 Fetch Operator limit:-1 Stage-1 Reducer 3 File Output Operator [FS_17] Group By Operator [GBY_15] (rows=1 width=8) Output:["_col0"],aggregations:["sum(VALUE._col0)"] <-Reducer 2 [GROUP] GROUP [RS_14] Group By Operator [GBY_13] (rows=1 width=8) Output:["_col0"],aggregations:["sum(hash(_col0,_col1,_col2,_col3))"] Select Operator [SEL_11] (rows=27556 width=22) Output:["_col0","_col1","_col2","_col3"] <-Map 1 [PARTITION-LEVEL SORT] PARTITION-LEVEL SORT [RS_10] Map Join Operator [MAPJOIN_20] (rows=27556 width=22) Conds:(Inner),Output:["_col0","_col1","_col2","_col3"] <-Select Operator [SEL_2] (rows=166 width=10) Output:["_col0","_col1"] Filter Operator [FIL_18] (rows=166 width=10) predicate:(key < 10) TableScan [TS_0] (rows=500 width=10) default@src,src,Tbl:COMPLETE,Col:NONE,Output:["key","value"] Map Reduce Local Work Stage-2 Map 4 keys: [HASHTABLESINK_22] Select Operator [SEL_5] (rows=166 width=10) Output:["_col0","_col1"] Filter Operator [FIL_19] (rows=166 width=10) predicate:(key < 10) TableScan [TS_3] (rows=500 width=10) default@src,src,Tbl:COMPLETE,Col:NONE,Output:["key","value"] Map Reduce Local Work {code} The raw query plan looks like: {code} { "STAGE DEPENDENCIES": { "Stage-2": { "ROOT STAGE": "TRUE" }, "Stage-1": { "DEPENDENT STAGES": "Stage-2" }, "Stage-0": { "DEPENDENT STAGES": "Stage-1" } }, "STAGE PLANS": { "Stage-2": { "Spark": { "Vertices:": { "Map 2": { "Map Operator Tree:": [ { "TableScan": { "Output:": [ "key", "value" ], "_empty_": "default@myinput1,b,Tbl:COMPLETE,Col:NONE", "Statistics:": "rows=3 width=8", "OperatorId:": "TS_1", "children": { "keys:": { "0": "key", "1": "value", "OperatorId:": "HASHTABLESINK_10" } } } } ], "Local Work:": { "Map Reduce Local Work": { } }, "tag:": "0" } } } }, "Stage-1": { "Spark": { "Vertices:": { "Map 1": { "Map Operator Tree:": [ { "TableScan": { "Output:": [ "key", "value" ], "_empty_": "default@myinput1,a,Tbl:COMPLETE,Col:NONE", "Statistics:": "rows=3 width=8", "OperatorId:": "TS_0", "children": { "Map Join Operator": { "condition map:": [ { "_empty_": "{\"type\":\"Inner\",\"left\":0,\"right\":1}" } ], "input vertices:": { "1": "Map 2" }, "keys:": { "0": "key", "1": "value" }, "Output:": [ "_col0", "_col1", "_col5", "_col6" ], "Statistics:": "rows=3 width=9", "OperatorId:": "MAPJOIN_7", "children": { "Select Operator": { "Output:": [ "_col0", "_col1", "_col2", "_col3" ], "Statistics:": "rows=3 width=9", "OperatorId:": "SEL_8", "children": { "File Output Operator": { "Statistics:": "rows=3 width=9", "OperatorId:": "FS_6" } } } } } } } } ], "Local Work:": { "Map Reduce Local Work": { } }, "tag:": "0" } } } }, "Stage-0": { "Fetch Operator": { "limit:": "-1" } } }, "cboInfo": "Plan not optimized by CBO due to missing feature [Less_than_equal_greater_than]." } {code} So it looks like the map -> reduce dependency is there, map-4 (the hash table sink operator) -> reducer-2 (group by); does that sound correct? > Support hive.explain.user for Spark > ----------------------------------- > > Key: HIVE-11133 > URL: https://issues.apache.org/jira/browse/HIVE-11133 > Project: Hive > Issue Type: Sub-task > Components: Spark > Reporter: Mohit Sabharwal > Assignee: Sahil Takiar > Attachments: HIVE-11133.1.patch, HIVE-11133.2.patch, HIVE-11133.3.patch, HIVE-11133.4.patch, HIVE-11133.5.patch, HIVE-11133.6.patch, HIVE-11133.7.patch > > > User friendly explain output ({{set hive.explain.user=true}}) should support Spark as well. > Once supported, we should also enable related q-tests like {{explainuser_1.q}} -- This message was sent by Atlassian JIRA (v6.3.15#6346)