You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by jc...@apache.org on 2016/12/06 19:45:47 UTC
hive git commit: HIVE-15370: Include Join residual filter expressions
in user level EXPLAIN (Jesus Camacho Rodriguez, reviewed by Ashutosh Chauhan)
Repository: hive
Updated Branches:
refs/heads/master 2f5889c9b -> bd35bd4e7
HIVE-15370: Include Join residual filter expressions in user level EXPLAIN (Jesus Camacho Rodriguez, reviewed by Ashutosh Chauhan)
Project: http://git-wip-us.apache.org/repos/asf/hive/repo
Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/bd35bd4e
Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/bd35bd4e
Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/bd35bd4e
Branch: refs/heads/master
Commit: bd35bd4e7d9525d8cc5d7e06b21038ec635e960b
Parents: 2f5889c
Author: Jesus Camacho Rodriguez <jc...@apache.org>
Authored: Tue Dec 6 16:16:34 2016 +0000
Committer: Jesus Camacho Rodriguez <jc...@apache.org>
Committed: Tue Dec 6 19:45:34 2016 +0000
----------------------------------------------------------------------
.../apache/hadoop/hive/ql/plan/JoinDesc.java | 2 +-
.../test/queries/clientpositive/explainuser_4.q | 6 +++
.../clientpositive/llap/explainuser_4.q.out | 39 ++++++++++++++++++++
3 files changed, 46 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hive/blob/bd35bd4e/ql/src/java/org/apache/hadoop/hive/ql/plan/JoinDesc.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/plan/JoinDesc.java b/ql/src/java/org/apache/hadoop/hive/ql/plan/JoinDesc.java
index 3cd611c..bcf3691 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/plan/JoinDesc.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/plan/JoinDesc.java
@@ -297,7 +297,7 @@ public class JoinDesc extends AbstractOperatorDesc {
this.filters = filters;
}
- @Explain(displayName = "residual filter predicates")
+ @Explain(displayName = "residual filter predicates", explainLevels = { Level.USER, Level.DEFAULT, Level.EXTENDED })
public String getResidualFilterExprsString() {
if (getResidualFilterExprs() == null || getResidualFilterExprs().size() == 0) {
return null;
http://git-wip-us.apache.org/repos/asf/hive/blob/bd35bd4e/ql/src/test/queries/clientpositive/explainuser_4.q
----------------------------------------------------------------------
diff --git a/ql/src/test/queries/clientpositive/explainuser_4.q b/ql/src/test/queries/clientpositive/explainuser_4.q
index 7b23ad6..f58afa8 100644
--- a/ql/src/test/queries/clientpositive/explainuser_4.q
+++ b/ql/src/test/queries/clientpositive/explainuser_4.q
@@ -101,3 +101,9 @@ where
a.cint between 1000000 and 3000000 and b.cbigint is not null
group by a.csmallint
order by c1;
+
+-- Left outer join with residual
+explain
+select *
+from alltypesorc a left outer join alltypesorc b
+on a.cint = b.cint or a.csmallint between 1 and 10;
http://git-wip-us.apache.org/repos/asf/hive/blob/bd35bd4e/ql/src/test/results/clientpositive/llap/explainuser_4.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/explainuser_4.q.out b/ql/src/test/results/clientpositive/llap/explainuser_4.q.out
index e83d6d8..4084206 100644
--- a/ql/src/test/results/clientpositive/llap/explainuser_4.q.out
+++ b/ql/src/test/results/clientpositive/llap/explainuser_4.q.out
@@ -480,3 +480,42 @@ POSTHOOK: Input: default@alltypesorc
-3799 1
10782 1
NULL 6
+Warning: Shuffle Join MERGEJOIN[9][tables = [$hdt$_0, $hdt$_1]] in Stage 'Reducer 2' is a cross product
+PREHOOK: query: -- Left outer join with residual
+explain
+select *
+from alltypesorc a left outer join alltypesorc b
+on a.cint = b.cint or a.csmallint between 1 and 10
+PREHOOK: type: QUERY
+POSTHOOK: query: -- Left outer join with residual
+explain
+select *
+from alltypesorc a left outer join alltypesorc b
+on a.cint = b.cint or a.csmallint between 1 and 10
+POSTHOOK: type: QUERY
+Plan optimized by CBO.
+
+Vertex dependency in root stage
+Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 3 (SIMPLE_EDGE)
+
+Stage-0
+ Fetch Operator
+ limit:-1
+ Stage-1
+ Reducer 2 llap
+ File Output Operator [FS_8]
+ Merge Join Operator [MERGEJOIN_9] (rows=150994944 width=431)
+ Conds:(Left Outer),Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11","_col12","_col13","_col14","_col15","_col16","_col17","_col18","_col19","_col20","_col21","_col22","_col23"],residual filter predicates:{((_col2 = _col14) or _col1 BETWEEN 1 AND 10)}
+ <-Map 1 [SIMPLE_EDGE] llap
+ SHUFFLE [RS_4]
+ Select Operator [SEL_1] (rows=12288 width=215)
+ Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11"]
+ TableScan [TS_0] (rows=12288 width=215)
+ default@alltypesorc,a,Tbl:COMPLETE,Col:NONE,Output:["ctinyint","csmallint","cint","cbigint","cfloat","cdouble","cstring1","cstring2","ctimestamp1","ctimestamp2","cboolean1","cboolean2"]
+ <-Map 3 [SIMPLE_EDGE] llap
+ SHUFFLE [RS_5]
+ Select Operator [SEL_3] (rows=12288 width=215)
+ Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11"]
+ TableScan [TS_2] (rows=12288 width=215)
+ default@alltypesorc,b,Tbl:COMPLETE,Col:NONE,Output:["ctinyint","csmallint","cint","cbigint","cfloat","cdouble","cstring1","cstring2","ctimestamp1","ctimestamp2","cboolean1","cboolean2"]
+