http://git-wip-us.apache.org/repos/asf/hive/blob/c7ac3405/ql/src/test/results/clientpositive/cbo_subq_exists.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/cbo_subq_exists.q.out 
b/ql/src/test/results/clientpositive/cbo_subq_exists.q.out
index 45f4524..06dbd30 100644
--- a/ql/src/test/results/clientpositive/cbo_subq_exists.q.out
+++ b/ql/src/test/results/clientpositive/cbo_subq_exists.q.out
@@ -195,6 +195,8 @@ POSTHOOK: type: CREATEVIEW
 POSTHOOK: Input: default@src_cbo
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@cv1
+POSTHOOK: Lineage: cv1.key SIMPLE [(src_cbo)b.FieldSchema(name:key, 
type:string, comment:null), ]
+POSTHOOK: Lineage: cv1.value SIMPLE [(src_cbo)b.FieldSchema(name:value, 
type:string, comment:null), ]
 PREHOOK: query: select * from cv1
 PREHOOK: type: QUERY
 PREHOOK: Input: default@cv1

http://git-wip-us.apache.org/repos/asf/hive/blob/c7ac3405/ql/src/test/results/clientpositive/cbo_union_view.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/cbo_union_view.q.out 
b/ql/src/test/results/clientpositive/cbo_union_view.q.out
index d179c28..c8504a1 100644
--- a/ql/src/test/results/clientpositive/cbo_union_view.q.out
+++ b/ql/src/test/results/clientpositive/cbo_union_view.q.out
@@ -50,6 +50,8 @@ POSTHOOK: Input: default@src_union_2
 POSTHOOK: Input: default@src_union_3
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@src_union_view
+POSTHOOK: Lineage: src_union_view.key EXPRESSION 
[(src_union_1)src_union_1.FieldSchema(name:key, type:int, comment:null), 
(src_union_2)src_union_2.FieldSchema(name:key, type:int, comment:null), 
(src_union_3)src_union_3.FieldSchema(name:key, type:int, comment:null), ]
+POSTHOOK: Lineage: src_union_view.value EXPRESSION 
[(src_union_1)src_union_1.FieldSchema(name:value, type:string, comment:null), 
(src_union_2)src_union_2.FieldSchema(name:value, type:string, comment:null), 
(src_union_3)src_union_3.FieldSchema(name:value, type:string, comment:null), ]
 PREHOOK: query: EXPLAIN SELECT key, value, ds FROM src_union_view WHERE key=86
 PREHOOK: type: QUERY
 POSTHOOK: query: EXPLAIN SELECT key, value, ds FROM src_union_view WHERE key=86

http://git-wip-us.apache.org/repos/asf/hive/blob/c7ac3405/ql/src/test/results/clientpositive/concat_op.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/concat_op.q.out 
b/ql/src/test/results/clientpositive/concat_op.q.out
index 6afefae..e7fad1f 100644
--- a/ql/src/test/results/clientpositive/concat_op.q.out
+++ b/ql/src/test/results/clientpositive/concat_op.q.out
@@ -172,6 +172,7 @@ POSTHOOK: Input: default@ct1
 POSTHOOK: Input: default@ct2
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@ct_v1
+POSTHOOK: Lineage: ct_v1.c EXPRESSION [(ct1)ct1.FieldSchema(name:c, type:int, 
comment:null), (ct2)ct2.FieldSchema(name:c, type:int, comment:null), ]
 PREHOOK: query: select c,c * c + c || 'x', 'c+c=' || c+c || ', c*c=' || c*c || 
', (c&c)=' || (c & c) from ct_v1
 PREHOOK: type: QUERY
 PREHOOK: Input: default@ct1

http://git-wip-us.apache.org/repos/asf/hive/blob/c7ac3405/ql/src/test/results/clientpositive/create_big_view.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/create_big_view.q.out 
b/ql/src/test/results/clientpositive/create_big_view.q.out
index 08f4c87..e5609e5 100644
--- a/ql/src/test/results/clientpositive/create_big_view.q.out
+++ b/ql/src/test/results/clientpositive/create_big_view.q.out
@@ -484,6 +484,241 @@ POSTHOOK: type: CREATEVIEW
 POSTHOOK: Input: default@src
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@big_view
+POSTHOOK: Lineage: big_view._c1 SIMPLE []
+POSTHOOK: Lineage: big_view._c10 SIMPLE []
+POSTHOOK: Lineage: big_view._c100 SIMPLE []
+POSTHOOK: Lineage: big_view._c101 SIMPLE []
+POSTHOOK: Lineage: big_view._c102 SIMPLE []
+POSTHOOK: Lineage: big_view._c103 SIMPLE []
+POSTHOOK: Lineage: big_view._c104 SIMPLE []
+POSTHOOK: Lineage: big_view._c105 SIMPLE []
+POSTHOOK: Lineage: big_view._c106 SIMPLE []
+POSTHOOK: Lineage: big_view._c107 SIMPLE []
+POSTHOOK: Lineage: big_view._c108 SIMPLE []
+POSTHOOK: Lineage: big_view._c109 SIMPLE []
+POSTHOOK: Lineage: big_view._c11 SIMPLE []
+POSTHOOK: Lineage: big_view._c110 SIMPLE []
+POSTHOOK: Lineage: big_view._c111 SIMPLE []
+POSTHOOK: Lineage: big_view._c112 SIMPLE []
+POSTHOOK: Lineage: big_view._c113 SIMPLE []
+POSTHOOK: Lineage: big_view._c114 SIMPLE []
+POSTHOOK: Lineage: big_view._c115 SIMPLE []
+POSTHOOK: Lineage: big_view._c116 SIMPLE []
+POSTHOOK: Lineage: big_view._c117 SIMPLE []
+POSTHOOK: Lineage: big_view._c118 SIMPLE []
+POSTHOOK: Lineage: big_view._c119 SIMPLE []
+POSTHOOK: Lineage: big_view._c12 SIMPLE []
+POSTHOOK: Lineage: big_view._c120 SIMPLE []
+POSTHOOK: Lineage: big_view._c121 SIMPLE []
+POSTHOOK: Lineage: big_view._c122 SIMPLE []
+POSTHOOK: Lineage: big_view._c123 SIMPLE []
+POSTHOOK: Lineage: big_view._c124 SIMPLE []
+POSTHOOK: Lineage: big_view._c125 SIMPLE []
+POSTHOOK: Lineage: big_view._c126 SIMPLE []
+POSTHOOK: Lineage: big_view._c127 SIMPLE []
+POSTHOOK: Lineage: big_view._c128 SIMPLE []
+POSTHOOK: Lineage: big_view._c129 SIMPLE []
+POSTHOOK: Lineage: big_view._c13 SIMPLE []
+POSTHOOK: Lineage: big_view._c130 SIMPLE []
+POSTHOOK: Lineage: big_view._c131 SIMPLE []
+POSTHOOK: Lineage: big_view._c132 SIMPLE []
+POSTHOOK: Lineage: big_view._c133 SIMPLE []
+POSTHOOK: Lineage: big_view._c134 SIMPLE []
+POSTHOOK: Lineage: big_view._c135 SIMPLE []
+POSTHOOK: Lineage: big_view._c136 SIMPLE []
+POSTHOOK: Lineage: big_view._c137 SIMPLE []
+POSTHOOK: Lineage: big_view._c138 SIMPLE []
+POSTHOOK: Lineage: big_view._c139 SIMPLE []
+POSTHOOK: Lineage: big_view._c14 SIMPLE []
+POSTHOOK: Lineage: big_view._c140 SIMPLE []
+POSTHOOK: Lineage: big_view._c141 SIMPLE []
+POSTHOOK: Lineage: big_view._c142 SIMPLE []
+POSTHOOK: Lineage: big_view._c143 SIMPLE []
+POSTHOOK: Lineage: big_view._c144 SIMPLE []
+POSTHOOK: Lineage: big_view._c145 SIMPLE []
+POSTHOOK: Lineage: big_view._c146 SIMPLE []
+POSTHOOK: Lineage: big_view._c147 SIMPLE []
+POSTHOOK: Lineage: big_view._c148 SIMPLE []
+POSTHOOK: Lineage: big_view._c149 SIMPLE []
+POSTHOOK: Lineage: big_view._c15 SIMPLE []
+POSTHOOK: Lineage: big_view._c150 SIMPLE []
+POSTHOOK: Lineage: big_view._c151 SIMPLE []
+POSTHOOK: Lineage: big_view._c152 SIMPLE []
+POSTHOOK: Lineage: big_view._c153 SIMPLE []
+POSTHOOK: Lineage: big_view._c154 SIMPLE []
+POSTHOOK: Lineage: big_view._c155 SIMPLE []
+POSTHOOK: Lineage: big_view._c156 SIMPLE []
+POSTHOOK: Lineage: big_view._c157 SIMPLE []
+POSTHOOK: Lineage: big_view._c158 SIMPLE []
+POSTHOOK: Lineage: big_view._c159 SIMPLE []
+POSTHOOK: Lineage: big_view._c16 SIMPLE []
+POSTHOOK: Lineage: big_view._c160 SIMPLE []
+POSTHOOK: Lineage: big_view._c161 SIMPLE []
+POSTHOOK: Lineage: big_view._c162 SIMPLE []
+POSTHOOK: Lineage: big_view._c163 SIMPLE []
+POSTHOOK: Lineage: big_view._c164 SIMPLE []
+POSTHOOK: Lineage: big_view._c165 SIMPLE []
+POSTHOOK: Lineage: big_view._c166 SIMPLE []
+POSTHOOK: Lineage: big_view._c167 SIMPLE []
+POSTHOOK: Lineage: big_view._c168 SIMPLE []
+POSTHOOK: Lineage: big_view._c169 SIMPLE []
+POSTHOOK: Lineage: big_view._c17 SIMPLE []
+POSTHOOK: Lineage: big_view._c170 SIMPLE []
+POSTHOOK: Lineage: big_view._c171 SIMPLE []
+POSTHOOK: Lineage: big_view._c172 SIMPLE []
+POSTHOOK: Lineage: big_view._c173 SIMPLE []
+POSTHOOK: Lineage: big_view._c174 SIMPLE []
+POSTHOOK: Lineage: big_view._c175 SIMPLE []
+POSTHOOK: Lineage: big_view._c176 SIMPLE []
+POSTHOOK: Lineage: big_view._c177 SIMPLE []
+POSTHOOK: Lineage: big_view._c178 SIMPLE []
+POSTHOOK: Lineage: big_view._c179 SIMPLE []
+POSTHOOK: Lineage: big_view._c18 SIMPLE []
+POSTHOOK: Lineage: big_view._c180 SIMPLE []
+POSTHOOK: Lineage: big_view._c181 SIMPLE []
+POSTHOOK: Lineage: big_view._c182 SIMPLE []
+POSTHOOK: Lineage: big_view._c183 SIMPLE []
+POSTHOOK: Lineage: big_view._c184 SIMPLE []
+POSTHOOK: Lineage: big_view._c185 SIMPLE []
+POSTHOOK: Lineage: big_view._c186 SIMPLE []
+POSTHOOK: Lineage: big_view._c187 SIMPLE []
+POSTHOOK: Lineage: big_view._c188 SIMPLE []
+POSTHOOK: Lineage: big_view._c189 SIMPLE []
+POSTHOOK: Lineage: big_view._c19 SIMPLE []
+POSTHOOK: Lineage: big_view._c190 SIMPLE []
+POSTHOOK: Lineage: big_view._c191 SIMPLE []
+POSTHOOK: Lineage: big_view._c192 SIMPLE []
+POSTHOOK: Lineage: big_view._c193 SIMPLE []
+POSTHOOK: Lineage: big_view._c194 SIMPLE []
+POSTHOOK: Lineage: big_view._c195 SIMPLE []
+POSTHOOK: Lineage: big_view._c196 SIMPLE []
+POSTHOOK: Lineage: big_view._c197 SIMPLE []
+POSTHOOK: Lineage: big_view._c198 SIMPLE []
+POSTHOOK: Lineage: big_view._c199 SIMPLE []
+POSTHOOK: Lineage: big_view._c2 SIMPLE []
+POSTHOOK: Lineage: big_view._c20 SIMPLE []
+POSTHOOK: Lineage: big_view._c200 SIMPLE []
+POSTHOOK: Lineage: big_view._c201 SIMPLE []
+POSTHOOK: Lineage: big_view._c202 SIMPLE []
+POSTHOOK: Lineage: big_view._c203 SIMPLE []
+POSTHOOK: Lineage: big_view._c204 SIMPLE []
+POSTHOOK: Lineage: big_view._c205 SIMPLE []
+POSTHOOK: Lineage: big_view._c206 SIMPLE []
+POSTHOOK: Lineage: big_view._c207 SIMPLE []
+POSTHOOK: Lineage: big_view._c208 SIMPLE []
+POSTHOOK: Lineage: big_view._c209 SIMPLE []
+POSTHOOK: Lineage: big_view._c21 SIMPLE []
+POSTHOOK: Lineage: big_view._c210 SIMPLE []
+POSTHOOK: Lineage: big_view._c211 SIMPLE []
+POSTHOOK: Lineage: big_view._c212 SIMPLE []
+POSTHOOK: Lineage: big_view._c213 SIMPLE []
+POSTHOOK: Lineage: big_view._c214 SIMPLE []
+POSTHOOK: Lineage: big_view._c215 SIMPLE []
+POSTHOOK: Lineage: big_view._c216 SIMPLE []
+POSTHOOK: Lineage: big_view._c217 SIMPLE []
+POSTHOOK: Lineage: big_view._c218 SIMPLE []
+POSTHOOK: Lineage: big_view._c219 SIMPLE []
+POSTHOOK: Lineage: big_view._c22 SIMPLE []
+POSTHOOK: Lineage: big_view._c220 SIMPLE []
+POSTHOOK: Lineage: big_view._c221 SIMPLE []
+POSTHOOK: Lineage: big_view._c222 SIMPLE []
+POSTHOOK: Lineage: big_view._c223 SIMPLE []
+POSTHOOK: Lineage: big_view._c224 SIMPLE []
+POSTHOOK: Lineage: big_view._c225 SIMPLE []
+POSTHOOK: Lineage: big_view._c226 SIMPLE []
+POSTHOOK: Lineage: big_view._c227 SIMPLE []
+POSTHOOK: Lineage: big_view._c228 SIMPLE []
+POSTHOOK: Lineage: big_view._c229 SIMPLE []
+POSTHOOK: Lineage: big_view._c23 SIMPLE []
+POSTHOOK: Lineage: big_view._c230 SIMPLE []
+POSTHOOK: Lineage: big_view._c231 SIMPLE []
+POSTHOOK: Lineage: big_view._c232 SIMPLE []
+POSTHOOK: Lineage: big_view._c233 SIMPLE []
+POSTHOOK: Lineage: big_view._c234 SIMPLE []
+POSTHOOK: Lineage: big_view._c24 SIMPLE []
+POSTHOOK: Lineage: big_view._c25 SIMPLE []
+POSTHOOK: Lineage: big_view._c26 SIMPLE []
+POSTHOOK: Lineage: big_view._c27 SIMPLE []
+POSTHOOK: Lineage: big_view._c28 SIMPLE []
+POSTHOOK: Lineage: big_view._c29 SIMPLE []
+POSTHOOK: Lineage: big_view._c3 SIMPLE []
+POSTHOOK: Lineage: big_view._c30 SIMPLE []
+POSTHOOK: Lineage: big_view._c31 SIMPLE []
+POSTHOOK: Lineage: big_view._c32 SIMPLE []
+POSTHOOK: Lineage: big_view._c33 SIMPLE []
+POSTHOOK: Lineage: big_view._c34 SIMPLE []
+POSTHOOK: Lineage: big_view._c35 SIMPLE []
+POSTHOOK: Lineage: big_view._c36 SIMPLE []
+POSTHOOK: Lineage: big_view._c37 SIMPLE []
+POSTHOOK: Lineage: big_view._c38 SIMPLE []
+POSTHOOK: Lineage: big_view._c39 SIMPLE []
+POSTHOOK: Lineage: big_view._c4 SIMPLE []
+POSTHOOK: Lineage: big_view._c40 SIMPLE []
+POSTHOOK: Lineage: big_view._c41 SIMPLE []
+POSTHOOK: Lineage: big_view._c42 SIMPLE []
+POSTHOOK: Lineage: big_view._c43 SIMPLE []
+POSTHOOK: Lineage: big_view._c44 SIMPLE []
+POSTHOOK: Lineage: big_view._c45 SIMPLE []
+POSTHOOK: Lineage: big_view._c46 SIMPLE []
+POSTHOOK: Lineage: big_view._c47 SIMPLE []
+POSTHOOK: Lineage: big_view._c48 SIMPLE []
+POSTHOOK: Lineage: big_view._c49 SIMPLE []
+POSTHOOK: Lineage: big_view._c5 SIMPLE []
+POSTHOOK: Lineage: big_view._c50 SIMPLE []
+POSTHOOK: Lineage: big_view._c51 SIMPLE []
+POSTHOOK: Lineage: big_view._c52 SIMPLE []
+POSTHOOK: Lineage: big_view._c53 SIMPLE []
+POSTHOOK: Lineage: big_view._c54 SIMPLE []
+POSTHOOK: Lineage: big_view._c55 SIMPLE []
+POSTHOOK: Lineage: big_view._c56 SIMPLE []
+POSTHOOK: Lineage: big_view._c57 SIMPLE []
+POSTHOOK: Lineage: big_view._c58 SIMPLE []
+POSTHOOK: Lineage: big_view._c59 SIMPLE []
+POSTHOOK: Lineage: big_view._c6 SIMPLE []
+POSTHOOK: Lineage: big_view._c60 SIMPLE []
+POSTHOOK: Lineage: big_view._c61 SIMPLE []
+POSTHOOK: Lineage: big_view._c62 SIMPLE []
+POSTHOOK: Lineage: big_view._c63 SIMPLE []
+POSTHOOK: Lineage: big_view._c64 SIMPLE []
+POSTHOOK: Lineage: big_view._c65 SIMPLE []
+POSTHOOK: Lineage: big_view._c66 SIMPLE []
+POSTHOOK: Lineage: big_view._c67 SIMPLE []
+POSTHOOK: Lineage: big_view._c68 SIMPLE []
+POSTHOOK: Lineage: big_view._c69 SIMPLE []
+POSTHOOK: Lineage: big_view._c7 SIMPLE []
+POSTHOOK: Lineage: big_view._c70 SIMPLE []
+POSTHOOK: Lineage: big_view._c71 SIMPLE []
+POSTHOOK: Lineage: big_view._c72 SIMPLE []
+POSTHOOK: Lineage: big_view._c73 SIMPLE []
+POSTHOOK: Lineage: big_view._c74 SIMPLE []
+POSTHOOK: Lineage: big_view._c75 SIMPLE []
+POSTHOOK: Lineage: big_view._c76 SIMPLE []
+POSTHOOK: Lineage: big_view._c77 SIMPLE []
+POSTHOOK: Lineage: big_view._c78 SIMPLE []
+POSTHOOK: Lineage: big_view._c79 SIMPLE []
+POSTHOOK: Lineage: big_view._c8 SIMPLE []
+POSTHOOK: Lineage: big_view._c80 SIMPLE []
+POSTHOOK: Lineage: big_view._c81 SIMPLE []
+POSTHOOK: Lineage: big_view._c82 SIMPLE []
+POSTHOOK: Lineage: big_view._c83 SIMPLE []
+POSTHOOK: Lineage: big_view._c84 SIMPLE []
+POSTHOOK: Lineage: big_view._c85 SIMPLE []
+POSTHOOK: Lineage: big_view._c86 SIMPLE []
+POSTHOOK: Lineage: big_view._c87 SIMPLE []
+POSTHOOK: Lineage: big_view._c88 SIMPLE []
+POSTHOOK: Lineage: big_view._c89 SIMPLE []
+POSTHOOK: Lineage: big_view._c9 SIMPLE []
+POSTHOOK: Lineage: big_view._c90 SIMPLE []
+POSTHOOK: Lineage: big_view._c91 SIMPLE []
+POSTHOOK: Lineage: big_view._c92 SIMPLE []
+POSTHOOK: Lineage: big_view._c93 SIMPLE []
+POSTHOOK: Lineage: big_view._c94 SIMPLE []
+POSTHOOK: Lineage: big_view._c95 SIMPLE []
+POSTHOOK: Lineage: big_view._c96 SIMPLE []
+POSTHOOK: Lineage: big_view._c97 SIMPLE []
+POSTHOOK: Lineage: big_view._c98 SIMPLE []
+POSTHOOK: Lineage: big_view._c99 SIMPLE []
+POSTHOOK: Lineage: big_view.a SIMPLE []
 PREHOOK: query: SELECT a FROM big_view
 LIMIT 1
 PREHOOK: type: QUERY

http://git-wip-us.apache.org/repos/asf/hive/blob/c7ac3405/ql/src/test/results/clientpositive/create_like_tbl_props.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/create_like_tbl_props.q.out 
b/ql/src/test/results/clientpositive/create_like_tbl_props.q.out
index bef54a8..19459fb 100644
--- a/ql/src/test/results/clientpositive/create_like_tbl_props.q.out
+++ b/ql/src/test/results/clientpositive/create_like_tbl_props.q.out
@@ -186,6 +186,8 @@ POSTHOOK: type: CREATEVIEW
 POSTHOOK: Input: default@src
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@test_view
+POSTHOOK: Lineage: test_view.key SIMPLE [(src)src.FieldSchema(name:key, 
type:string, comment:default), ]
+POSTHOOK: Lineage: test_view.value SIMPLE [(src)src.FieldSchema(name:value, 
type:string, comment:default), ]
 PREHOOK: query: CREATE TABLE test_table4 LIKE test_view 
TBLPROPERTIES('key'='value')
 PREHOOK: type: CREATETABLE
 PREHOOK: Output: database:default

http://git-wip-us.apache.org/repos/asf/hive/blob/c7ac3405/ql/src/test/results/clientpositive/create_like_view.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/create_like_view.q.out 
b/ql/src/test/results/clientpositive/create_like_view.q.out
index c1b5c7e..9e6dcd1 100644
--- a/ql/src/test/results/clientpositive/create_like_view.q.out
+++ b/ql/src/test/results/clientpositive/create_like_view.q.out
@@ -75,6 +75,8 @@ POSTHOOK: type: CREATEVIEW
 POSTHOOK: Input: default@table1
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@view1
+POSTHOOK: Lineage: view1.a SIMPLE [(table1)table1.FieldSchema(name:a, 
type:string, comment:null), ]
+POSTHOOK: Lineage: view1.b SIMPLE [(table1)table1.FieldSchema(name:b, 
type:string, comment:null), ]
 PREHOOK: query: CREATE TABLE table2 LIKE view1
 PREHOOK: type: CREATETABLE
 PREHOOK: Output: database:default
@@ -259,6 +261,8 @@ POSTHOOK: type: CREATEVIEW
 POSTHOOK: Input: default@srcpart
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@view1
+POSTHOOK: Lineage: view1.key SIMPLE [(srcpart)srcpart.FieldSchema(name:key, 
type:string, comment:default), ]
+POSTHOOK: Lineage: view1.value SIMPLE 
[(srcpart)srcpart.FieldSchema(name:value, type:string, comment:default), ]
 PREHOOK: query: create table table1 like view1
 PREHOOK: type: CREATETABLE
 PREHOOK: Output: database:default

http://git-wip-us.apache.org/repos/asf/hive/blob/c7ac3405/ql/src/test/results/clientpositive/create_or_replace_view.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/create_or_replace_view.q.out 
b/ql/src/test/results/clientpositive/create_or_replace_view.q.out
index 2ad6b47..98e0ca2 100644
--- a/ql/src/test/results/clientpositive/create_or_replace_view.q.out
+++ b/ql/src/test/results/clientpositive/create_or_replace_view.q.out
@@ -14,6 +14,10 @@ POSTHOOK: type: CREATEVIEW
 POSTHOOK: Input: default@srcpart
 POSTHOOK: Output: database:vt
 POSTHOOK: Output: vt@v
+POSTHOOK: Lineage: v.ds SIMPLE [(srcpart)srcpart.FieldSchema(name:ds, 
type:string, comment:null), ]
+POSTHOOK: Lineage: v.hr SIMPLE [(srcpart)srcpart.FieldSchema(name:hr, 
type:string, comment:null), ]
+POSTHOOK: Lineage: v.key SIMPLE [(srcpart)srcpart.FieldSchema(name:key, 
type:string, comment:default), ]
+POSTHOOK: Lineage: v.value SIMPLE [(srcpart)srcpart.FieldSchema(name:value, 
type:string, comment:default), ]
 PREHOOK: query: describe formatted vt.v
 PREHOOK: type: DESCTABLE
 PREHOOK: Input: vt@v
@@ -330,6 +334,8 @@ POSTHOOK: type: CREATEVIEW
 POSTHOOK: Input: default@srcpart_temp
 POSTHOOK: Output: database:vt
 POSTHOOK: Output: vt@v
+POSTHOOK: Lineage: v.key SIMPLE 
[(srcpart_temp)srcpart_temp.FieldSchema(name:key, type:string, 
comment:default), ]
+POSTHOOK: Lineage: v.value SIMPLE 
[(srcpart_temp)srcpart_temp.FieldSchema(name:value, type:string, 
comment:default), ]
 PREHOOK: query: drop table srcpart_temp
 PREHOOK: type: DROPTABLE
 PREHOOK: Input: default@srcpart_temp

http://git-wip-us.apache.org/repos/asf/hive/blob/c7ac3405/ql/src/test/results/clientpositive/create_view.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/create_view.q.out 
b/ql/src/test/results/clientpositive/create_view.q.out
index a7f3229..7deac3e 100644
--- a/ql/src/test/results/clientpositive/create_view.q.out
+++ b/ql/src/test/results/clientpositive/create_view.q.out
@@ -93,6 +93,7 @@ POSTHOOK: type: CREATEVIEW
 POSTHOOK: Input: default@src
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@view1
+POSTHOOK: Lineage: view1.value SIMPLE [(src)src.FieldSchema(name:value, 
type:string, comment:default), ]
 PREHOOK: query: CREATE VIEW view2 AS SELECT * FROM src
 PREHOOK: type: CREATEVIEW
 PREHOOK: Input: default@src
@@ -103,6 +104,8 @@ POSTHOOK: type: CREATEVIEW
 POSTHOOK: Input: default@src
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@view2
+POSTHOOK: Lineage: view2.key SIMPLE [(src)src.FieldSchema(name:key, 
type:string, comment:default), ]
+POSTHOOK: Lineage: view2.value SIMPLE [(src)src.FieldSchema(name:value, 
type:string, comment:default), ]
 PREHOOK: query: CREATE VIEW view3(valoo) 
 TBLPROPERTIES ("fear" = "factor")
 AS SELECT upper(value) FROM src WHERE key=86
@@ -117,6 +120,7 @@ POSTHOOK: type: CREATEVIEW
 POSTHOOK: Input: default@src
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@view3
+POSTHOOK: Lineage: view3.valoo EXPRESSION [(src)src.FieldSchema(name:value, 
type:string, comment:default), ]
 PREHOOK: query: SELECT * from view1
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
@@ -479,6 +483,7 @@ POSTHOOK: type: CREATEVIEW
 POSTHOOK: Input: default@table1
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@view4
+POSTHOOK: Lineage: view4.key SIMPLE [(table1)table1.FieldSchema(name:key, 
type:int, comment:null), ]
 PREHOOK: query: SELECT * FROM view4
 PREHOOK: type: QUERY
 PREHOOK: Input: default@table1
@@ -554,6 +559,8 @@ POSTHOOK: Input: default@table1
 POSTHOOK: Input: default@view4
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@view5
+POSTHOOK: Lineage: view5.key1 SIMPLE [(table1)table1.FieldSchema(name:key, 
type:int, comment:null), ]
+POSTHOOK: Lineage: view5.key2 SIMPLE [(table1)table1.FieldSchema(name:key, 
type:int, comment:null), ]
 Warning: Shuffle Join JOIN[6][tables = [$hdt$_0, $hdt$_1]] in Stage 
'Stage-1:MAPRED' is a cross product
 PREHOOK: query: SELECT * FROM view5
 PREHOOK: type: QUERY
@@ -588,6 +595,7 @@ POSTHOOK: type: CREATEVIEW
 POSTHOOK: Input: default@src
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@view6
+POSTHOOK: Lineage: view6.valoo EXPRESSION [(src)src.FieldSchema(name:value, 
type:string, comment:default), ]
 PREHOOK: query: DESCRIBE view6
 PREHOOK: type: DESCTABLE
 PREHOOK: Input: default@view6
@@ -613,6 +621,8 @@ POSTHOOK: type: CREATEVIEW
 POSTHOOK: Input: default@src
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@view7
+POSTHOOK: Lineage: view7.key SIMPLE [(src)src.FieldSchema(name:key, 
type:string, comment:default), ]
+POSTHOOK: Lineage: view7.value SIMPLE [(src)src.FieldSchema(name:value, 
type:string, comment:default), ]
 PREHOOK: query: SELECT * FROM view7
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
@@ -710,6 +720,7 @@ POSTHOOK: type: CREATEVIEW
 POSTHOOK: Input: default@table1
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@view8
+POSTHOOK: Lineage: view8.c EXPRESSION []
 PREHOOK: query: DESCRIBE EXTENDED view8
 PREHOOK: type: DESCTABLE
 PREHOOK: Input: default@view8
@@ -787,6 +798,7 @@ POSTHOOK: type: CREATEVIEW
 POSTHOOK: Input: default@src
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@view9
+POSTHOOK: Lineage: view9.m EXPRESSION [(src)src.FieldSchema(name:value, 
type:string, comment:default), ]
 PREHOOK: query: DESCRIBE EXTENDED view9
 PREHOOK: type: DESCTABLE
 PREHOOK: Input: default@view9
@@ -864,6 +876,7 @@ POSTHOOK: type: CREATEVIEW
 POSTHOOK: Input: default@src
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@view9
+POSTHOOK: Lineage: view9.m EXPRESSION [(src)src.FieldSchema(name:value, 
type:string, comment:default), ]
 PREHOOK: query: DESCRIBE EXTENDED view9
 PREHOOK: type: DESCTABLE
 PREHOOK: Input: default@view9
@@ -931,6 +944,8 @@ POSTHOOK: type: CREATEVIEW
 POSTHOOK: Input: default@src
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@view10
+POSTHOOK: Lineage: view10.key SIMPLE [(src)src.FieldSchema(name:key, 
type:string, comment:default), ]
+POSTHOOK: Lineage: view10.value SIMPLE [(src)src.FieldSchema(name:value, 
type:string, comment:default), ]
 PREHOOK: query: DESCRIBE EXTENDED view10
 PREHOOK: type: DESCTABLE
 PREHOOK: Input: default@view10
@@ -1006,6 +1021,7 @@ POSTHOOK: type: CREATEVIEW
 POSTHOOK: Input: default@table1
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@view11
+POSTHOOK: Lineage: view11.boom SCRIPT []
 PREHOOK: query: DESCRIBE EXTENDED view11
 PREHOOK: type: DESCTABLE
 PREHOOK: Input: default@view11
@@ -1075,6 +1091,9 @@ POSTHOOK: type: CREATEVIEW
 POSTHOOK: Input: default@src
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@view12
+POSTHOOK: Lineage: view12.key SIMPLE [(src)src.FieldSchema(name:key, 
type:string, comment:default), ]
+POSTHOOK: Lineage: view12.mycol SCRIPT []
+POSTHOOK: Lineage: view12.value SIMPLE [(src)src.FieldSchema(name:value, 
type:string, comment:default), ]
 PREHOOK: query: DESCRIBE EXTENDED view12
 PREHOOK: type: DESCTABLE
 PREHOOK: Input: default@view12
@@ -1159,6 +1178,7 @@ POSTHOOK: type: CREATEVIEW
 POSTHOOK: Input: default@srcbucket
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@view13
+POSTHOOK: Lineage: view13.key SIMPLE [(srcbucket)s.FieldSchema(name:key, 
type:int, comment:null), ]
 PREHOOK: query: DESCRIBE EXTENDED view13
 PREHOOK: type: DESCTABLE
 PREHOOK: Input: default@view13
@@ -1257,6 +1277,10 @@ POSTHOOK: type: CREATEVIEW
 POSTHOOK: Input: default@src
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@view14
+POSTHOOK: Lineage: view14.k1 EXPRESSION [(src)s2.FieldSchema(name:key, 
type:string, comment:default), ]
+POSTHOOK: Lineage: view14.k2 EXPRESSION [(src)s4.FieldSchema(name:key, 
type:string, comment:default), ]
+POSTHOOK: Lineage: view14.v1 EXPRESSION [(src)s1.null, 
(src)s2.FieldSchema(name:value, type:string, comment:default), ]
+POSTHOOK: Lineage: view14.v2 EXPRESSION [(src)s3.null, 
(src)s4.FieldSchema(name:value, type:string, comment:default), ]
 PREHOOK: query: DESCRIBE EXTENDED view14
 PREHOOK: type: DESCTABLE
 PREHOOK: Input: default@view14
@@ -1390,6 +1414,8 @@ POSTHOOK: type: CREATEVIEW
 POSTHOOK: Input: default@src
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@view15
+POSTHOOK: Lineage: view15.key SIMPLE [(src)src.FieldSchema(name:key, 
type:string, comment:default), ]
+POSTHOOK: Lineage: view15.value_count EXPRESSION 
[(src)src.FieldSchema(name:value, type:string, comment:default), ]
 PREHOOK: query: DESCRIBE EXTENDED view15
 PREHOOK: type: DESCTABLE
 PREHOOK: Input: default@view15
@@ -1478,6 +1504,7 @@ POSTHOOK: type: CREATEVIEW
 POSTHOOK: Input: default@src
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@view16
+POSTHOOK: Lineage: view16.value SIMPLE [(src)src.FieldSchema(name:value, 
type:string, comment:default), ]
 PREHOOK: query: DESCRIBE EXTENDED view16
 PREHOOK: type: DESCTABLE
 PREHOOK: Input: default@view16

http://git-wip-us.apache.org/repos/asf/hive/blob/c7ac3405/ql/src/test/results/clientpositive/create_view_defaultformats.q.out
----------------------------------------------------------------------
diff --git 
a/ql/src/test/results/clientpositive/create_view_defaultformats.q.out 
b/ql/src/test/results/clientpositive/create_view_defaultformats.q.out
index 2412513..1ac20c2 100644
--- a/ql/src/test/results/clientpositive/create_view_defaultformats.q.out
+++ b/ql/src/test/results/clientpositive/create_view_defaultformats.q.out
@@ -16,6 +16,8 @@ POSTHOOK: type: CREATEVIEW
 POSTHOOK: Input: default@src
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@sfsrc
+POSTHOOK: Lineage: sfsrc.key SIMPLE [(src)src.FieldSchema(name:key, 
type:string, comment:default), ]
+POSTHOOK: Lineage: sfsrc.value SIMPLE [(src)src.FieldSchema(name:value, 
type:string, comment:default), ]
 PREHOOK: query: create view rcsrc as select * from src
 PREHOOK: type: CREATEVIEW
 PREHOOK: Input: default@src
@@ -26,6 +28,8 @@ POSTHOOK: type: CREATEVIEW
 POSTHOOK: Input: default@src
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@rcsrc
+POSTHOOK: Lineage: rcsrc.key SIMPLE [(src)src.FieldSchema(name:key, 
type:string, comment:default), ]
+POSTHOOK: Lineage: rcsrc.value SIMPLE [(src)src.FieldSchema(name:value, 
type:string, comment:default), ]
 PREHOOK: query: describe formatted sfsrc
 PREHOOK: type: DESCTABLE
 PREHOOK: Input: default@sfsrc

http://git-wip-us.apache.org/repos/asf/hive/blob/c7ac3405/ql/src/test/results/clientpositive/create_view_partitioned.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/create_view_partitioned.q.out 
b/ql/src/test/results/clientpositive/create_view_partitioned.q.out
index 85667b6..46a81c4 100644
--- a/ql/src/test/results/clientpositive/create_view_partitioned.q.out
+++ b/ql/src/test/results/clientpositive/create_view_partitioned.q.out
@@ -30,6 +30,7 @@ POSTHOOK: type: CREATEVIEW
 POSTHOOK: Input: default@src
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@vp1
+POSTHOOK: Lineage: vp1.key SIMPLE [(src)src.FieldSchema(name:key, type:string, 
comment:default), ]
 PREHOOK: query: DESCRIBE EXTENDED vp1
 PREHOOK: type: DESCTABLE
 PREHOOK: Input: default@vp1
@@ -239,6 +240,9 @@ POSTHOOK: type: CREATEVIEW
 POSTHOOK: Input: default@srcpart
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@vp2
+POSTHOOK: Lineage: vp2.ds SIMPLE [(srcpart)srcpart.FieldSchema(name:ds, 
type:string, comment:null), ]
+POSTHOOK: Lineage: vp2.key SIMPLE [(srcpart)srcpart.FieldSchema(name:key, 
type:string, comment:default), ]
+POSTHOOK: Lineage: vp2.value SIMPLE [(srcpart)srcpart.FieldSchema(name:value, 
type:string, comment:default), ]
 PREHOOK: query: DESCRIBE FORMATTED vp2
 PREHOOK: type: DESCTABLE
 PREHOOK: Input: default@vp2
@@ -351,6 +355,7 @@ POSTHOOK: type: CREATEVIEW
 POSTHOOK: Input: default@src
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@vp3
+POSTHOOK: Lineage: vp3.k SIMPLE [(src)src.FieldSchema(name:key, type:string, 
comment:default), ]
 PREHOOK: query: DESCRIBE FORMATTED vp3
 PREHOOK: type: DESCTABLE
 PREHOOK: Input: default@vp3

http://git-wip-us.apache.org/repos/asf/hive/blob/c7ac3405/ql/src/test/results/clientpositive/create_view_translate.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/create_view_translate.q.out 
b/ql/src/test/results/clientpositive/create_view_translate.q.out
index 4b3e196..78614f7 100644
--- a/ql/src/test/results/clientpositive/create_view_translate.q.out
+++ b/ql/src/test/results/clientpositive/create_view_translate.q.out
@@ -16,6 +16,7 @@ POSTHOOK: type: CREATEVIEW
 POSTHOOK: Input: default@src
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@v
+POSTHOOK: Lineage: v.key SIMPLE [(src)src.FieldSchema(name:key, type:string, 
comment:default), ]
 PREHOOK: query: describe formatted v
 PREHOOK: type: DESCTABLE
 PREHOOK: Input: default@v
@@ -61,6 +62,8 @@ POSTHOOK: type: CREATEVIEW
 POSTHOOK: Input: default@src
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@w
+POSTHOOK: Lineage: w.key SIMPLE [(src)src.FieldSchema(name:key, type:string, 
comment:default), ]
+POSTHOOK: Lineage: w.value SIMPLE [(src)src.FieldSchema(name:value, 
type:string, comment:default), ]
 PREHOOK: query: describe formatted w
 PREHOOK: type: DESCTABLE
 PREHOOK: Input: default@w
@@ -151,6 +154,8 @@ POSTHOOK: type: CREATEVIEW
 POSTHOOK: Input: default@items
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@priceview
+POSTHOOK: Lineage: priceview._c1 EXPRESSION 
[(items)items.FieldSchema(name:info, type:map<string,string>, comment:null), ]
+POSTHOOK: Lineage: priceview.id SIMPLE [(items)items.FieldSchema(name:id, 
type:int, comment:null), ]
 PREHOOK: query: select * from priceview
 PREHOOK: type: QUERY
 PREHOOK: Input: default@items

http://git-wip-us.apache.org/repos/asf/hive/blob/c7ac3405/ql/src/test/results/clientpositive/ctas_char.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/ctas_char.q.out 
b/ql/src/test/results/clientpositive/ctas_char.q.out
index d5f77cd..e0fc050 100644
--- a/ql/src/test/results/clientpositive/ctas_char.q.out
+++ b/ql/src/test/results/clientpositive/ctas_char.q.out
@@ -52,6 +52,8 @@ POSTHOOK: type: CREATEVIEW
 POSTHOOK: Input: default@ctas_char_2
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@ctas_char_3
+POSTHOOK: Lineage: ctas_char_3.key SIMPLE 
[(ctas_char_2)ctas_char_2.FieldSchema(name:key, type:char(10), comment:null), ]
+POSTHOOK: Lineage: ctas_char_3.value SIMPLE 
[(ctas_char_2)ctas_char_2.FieldSchema(name:value, type:string, comment:null), ]
 PREHOOK: query: select key, value from ctas_char_1
 PREHOOK: type: QUERY
 PREHOOK: Input: default@ctas_char_1

http://git-wip-us.apache.org/repos/asf/hive/blob/c7ac3405/ql/src/test/results/clientpositive/ctas_date.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/ctas_date.q.out 
b/ql/src/test/results/clientpositive/ctas_date.q.out
index cd2a240..44f1126 100644
--- a/ql/src/test/results/clientpositive/ctas_date.q.out
+++ b/ql/src/test/results/clientpositive/ctas_date.q.out
@@ -59,6 +59,10 @@ POSTHOOK: type: CREATEVIEW
 POSTHOOK: Input: default@ctas_date_2
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@ctas_date_3
+POSTHOOK: Lineage: ctas_date_3._c3 SIMPLE 
[(ctas_date_2)ctas_date_2.FieldSchema(name:_c3, type:date, comment:null), ]
+POSTHOOK: Lineage: ctas_date_3.dd SIMPLE 
[(ctas_date_2)ctas_date_2.FieldSchema(name:dd, type:date, comment:null), ]
+POSTHOOK: Lineage: ctas_date_3.key SIMPLE 
[(ctas_date_2)ctas_date_2.FieldSchema(name:key, type:int, comment:null), ]
+POSTHOOK: Lineage: ctas_date_3.value SIMPLE 
[(ctas_date_2)ctas_date_2.FieldSchema(name:value, type:string, comment:null), ]
 PREHOOK: query: create view ctas_date_4 as select * from ctas_date_2 where dd 
< date '2000-01-01'
 PREHOOK: type: CREATEVIEW
 PREHOOK: Input: default@ctas_date_2
@@ -69,6 +73,10 @@ POSTHOOK: type: CREATEVIEW
 POSTHOOK: Input: default@ctas_date_2
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@ctas_date_4
+POSTHOOK: Lineage: ctas_date_4._c3 SIMPLE 
[(ctas_date_2)ctas_date_2.FieldSchema(name:_c3, type:date, comment:null), ]
+POSTHOOK: Lineage: ctas_date_4.dd SIMPLE 
[(ctas_date_2)ctas_date_2.FieldSchema(name:dd, type:date, comment:null), ]
+POSTHOOK: Lineage: ctas_date_4.key SIMPLE 
[(ctas_date_2)ctas_date_2.FieldSchema(name:key, type:int, comment:null), ]
+POSTHOOK: Lineage: ctas_date_4.value SIMPLE 
[(ctas_date_2)ctas_date_2.FieldSchema(name:value, type:string, comment:null), ]
 PREHOOK: query: select key, value, dd, date '1980-12-12' from ctas_date_1
 PREHOOK: type: QUERY
 PREHOOK: Input: default@ctas_date_1

http://git-wip-us.apache.org/repos/asf/hive/blob/c7ac3405/ql/src/test/results/clientpositive/ctas_varchar.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/ctas_varchar.q.out 
b/ql/src/test/results/clientpositive/ctas_varchar.q.out
index 3ed5e86..d9a9519 100644
--- a/ql/src/test/results/clientpositive/ctas_varchar.q.out
+++ b/ql/src/test/results/clientpositive/ctas_varchar.q.out
@@ -52,6 +52,8 @@ POSTHOOK: type: CREATEVIEW
 POSTHOOK: Input: default@ctas_varchar_2
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@ctas_varchar_3
+POSTHOOK: Lineage: ctas_varchar_3.key SIMPLE 
[(ctas_varchar_2)ctas_varchar_2.FieldSchema(name:key, type:varchar(10), 
comment:null), ]
+POSTHOOK: Lineage: ctas_varchar_3.value SIMPLE 
[(ctas_varchar_2)ctas_varchar_2.FieldSchema(name:value, type:string, 
comment:null), ]
 PREHOOK: query: select key, value from ctas_varchar_1
 PREHOOK: type: QUERY
 PREHOOK: Input: default@ctas_varchar_1

http://git-wip-us.apache.org/repos/asf/hive/blob/c7ac3405/ql/src/test/results/clientpositive/cteViews.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/cteViews.q.out 
b/ql/src/test/results/clientpositive/cteViews.q.out
index 69f0a91..3a9bd43 100644
--- a/ql/src/test/results/clientpositive/cteViews.q.out
+++ b/ql/src/test/results/clientpositive/cteViews.q.out
@@ -35,6 +35,7 @@ POSTHOOK: type: CREATEVIEW
 POSTHOOK: Input: default@src
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@v
+POSTHOOK: Lineage: v.key SIMPLE [(src)src.FieldSchema(name:key, type:string, 
comment:default), ]
 PREHOOK: query: describe extended v
 PREHOOK: type: DESCTABLE
 PREHOOK: Input: default@v
@@ -107,6 +108,8 @@ POSTHOOK: type: CREATEVIEW
 POSTHOOK: Input: default@src
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@v
+POSTHOOK: Lineage: v.key SIMPLE [(src)src.FieldSchema(name:key, type:string, 
comment:default), ]
+POSTHOOK: Lineage: v.value SIMPLE [(src)src.FieldSchema(name:value, 
type:string, comment:default), ]
 PREHOOK: query: describe extended v
 PREHOOK: type: DESCTABLE
 PREHOOK: Input: default@v
@@ -180,6 +183,7 @@ POSTHOOK: type: CREATEVIEW
 POSTHOOK: Input: default@src
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@v
+POSTHOOK: Lineage: v.key SIMPLE [(src)src.FieldSchema(name:key, type:string, 
comment:default), ]
 PREHOOK: query: describe extended v
 PREHOOK: type: DESCTABLE
 PREHOOK: Input: default@v
@@ -244,6 +248,7 @@ POSTHOOK: type: CREATEVIEW
 POSTHOOK: Input: default@src
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@v
+POSTHOOK: Lineage: v.key SIMPLE [(src)src.FieldSchema(name:key, type:string, 
comment:default), ]
 PREHOOK: query: describe extended v
 PREHOOK: type: DESCTABLE
 PREHOOK: Input: default@v

http://git-wip-us.apache.org/repos/asf/hive/blob/c7ac3405/ql/src/test/results/clientpositive/cte_2.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/cte_2.q.out 
b/ql/src/test/results/clientpositive/cte_2.q.out
index 1506217..c2bc565 100644
--- a/ql/src/test/results/clientpositive/cte_2.q.out
+++ b/ql/src/test/results/clientpositive/cte_2.q.out
@@ -118,6 +118,7 @@ POSTHOOK: type: CREATEVIEW
 POSTHOOK: Input: default@src
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@v1
+POSTHOOK: Lineage: v1.key SIMPLE [(src)src.FieldSchema(name:key, type:string, 
comment:default), ]
 PREHOOK: query: select * from v1
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
@@ -153,6 +154,7 @@ POSTHOOK: type: CREATEVIEW
 POSTHOOK: Input: default@src
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@v1
+POSTHOOK: Lineage: v1.key SIMPLE [(src)src.FieldSchema(name:key, type:string, 
comment:default), ]
 PREHOOK: query: with q1 as ( select key from src where key = '4')
 select * from v1
 PREHOOK: type: QUERY
@@ -190,6 +192,8 @@ POSTHOOK: type: CREATEVIEW
 POSTHOOK: Input: default@alltypesorc
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@view_3
+POSTHOOK: Lineage: view_3._c1 EXPRESSION 
[(alltypesorc)alltypesorc.FieldSchema(name:cint, type:int, comment:null), ]
+POSTHOOK: Lineage: view_3.cstring2 SIMPLE 
[(alltypesorc)alltypesorc.FieldSchema(name:cstring2, type:string, 
comment:null), ]
 PREHOOK: query: drop view if exists view_4
 PREHOOK: type: DROPVIEW
 POSTHOOK: query: drop view if exists view_4
@@ -204,3 +208,5 @@ POSTHOOK: type: CREATEVIEW
 POSTHOOK: Input: default@alltypesorc
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@view_4
+POSTHOOK: Lineage: view_4.cstring1 SIMPLE 
[(alltypesorc)s.FieldSchema(name:cstring1, type:string, comment:null), ]
+POSTHOOK: Lineage: view_4.ctimestamp1 SIMPLE 
[(alltypesorc)v.FieldSchema(name:ctimestamp1, type:timestamp, comment:null), ]

http://git-wip-us.apache.org/repos/asf/hive/blob/c7ac3405/ql/src/test/results/clientpositive/cte_4.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/cte_4.q.out 
b/ql/src/test/results/clientpositive/cte_4.q.out
index de976c3..ce92dca 100644
--- a/ql/src/test/results/clientpositive/cte_4.q.out
+++ b/ql/src/test/results/clientpositive/cte_4.q.out
@@ -148,6 +148,7 @@ POSTHOOK: type: CREATEVIEW
 POSTHOOK: Input: default@src
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@v1
+POSTHOOK: Lineage: v1.key SIMPLE [(src)src.FieldSchema(name:key, type:string, 
comment:default), ]
 PREHOOK: query: select * from v1
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
@@ -183,6 +184,7 @@ POSTHOOK: type: CREATEVIEW
 POSTHOOK: Input: default@src
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@v1
+POSTHOOK: Lineage: v1.key SIMPLE [(src)src.FieldSchema(name:key, type:string, 
comment:default), ]
 PREHOOK: query: with q1 as ( select key from src where key = '4')
 select * from v1
 PREHOOK: type: QUERY

http://git-wip-us.apache.org/repos/asf/hive/blob/c7ac3405/ql/src/test/results/clientpositive/database_drop.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/database_drop.q.out 
b/ql/src/test/results/clientpositive/database_drop.q.out
index f37d8f7..9059c38 100644
--- a/ql/src/test/results/clientpositive/database_drop.q.out
+++ b/ql/src/test/results/clientpositive/database_drop.q.out
@@ -43,6 +43,8 @@ POSTHOOK: type: CREATEVIEW
 POSTHOOK: Input: db5@temp_tbl
 POSTHOOK: Output: database:db5
 POSTHOOK: Output: db5@temp_tbl_view
+POSTHOOK: Lineage: temp_tbl_view.id SIMPLE 
[(temp_tbl)temp_tbl.FieldSchema(name:id, type:int, comment:null), ]
+POSTHOOK: Lineage: temp_tbl_view.name SIMPLE 
[(temp_tbl)temp_tbl.FieldSchema(name:name, type:string, comment:null), ]
 PREHOOK: query: CREATE INDEX idx1 ON TABLE temp_tbl(id) AS 'COMPACT' with 
DEFERRED REBUILD
 PREHOOK: type: CREATEINDEX
 PREHOOK: Input: db5@temp_tbl
@@ -89,6 +91,8 @@ POSTHOOK: type: CREATEVIEW
 POSTHOOK: Input: db5@temp_tbl2
 POSTHOOK: Output: database:db5
 POSTHOOK: Output: db5@temp_tbl2_view
+POSTHOOK: Lineage: temp_tbl2_view.id SIMPLE 
[(temp_tbl2)temp_tbl2.FieldSchema(name:id, type:int, comment:null), ]
+POSTHOOK: Lineage: temp_tbl2_view.name SIMPLE 
[(temp_tbl2)temp_tbl2.FieldSchema(name:name, type:string, comment:null), ]
 #### A masked pattern was here ####
 PREHOOK: type: CREATEINDEX
 PREHOOK: Input: db5@temp_tbl2

http://git-wip-us.apache.org/repos/asf/hive/blob/c7ac3405/ql/src/test/results/clientpositive/dbtxnmgr_ddl1.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/dbtxnmgr_ddl1.q.out 
b/ql/src/test/results/clientpositive/dbtxnmgr_ddl1.q.out
index f9adbc9..836ab3f 100644
--- a/ql/src/test/results/clientpositive/dbtxnmgr_ddl1.q.out
+++ b/ql/src/test/results/clientpositive/dbtxnmgr_ddl1.q.out
@@ -224,6 +224,7 @@ POSTHOOK: type: CREATEVIEW
 POSTHOOK: Input: default@t1
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@V1
+POSTHOOK: Lineage: V1.key SIMPLE [(t1)t1.FieldSchema(name:key, type:string, 
comment:null), ]
 PREHOOK: query: alter view V1 set tblproperties ('test'='thisisatest')
 PREHOOK: type: ALTERVIEW_PROPERTIES
 PREHOOK: Input: default@v1

http://git-wip-us.apache.org/repos/asf/hive/blob/c7ac3405/ql/src/test/results/clientpositive/dbtxnmgr_query5.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/dbtxnmgr_query5.q.out 
b/ql/src/test/results/clientpositive/dbtxnmgr_query5.q.out
index a95c5aa..facd497 100644
--- a/ql/src/test/results/clientpositive/dbtxnmgr_query5.q.out
+++ b/ql/src/test/results/clientpositive/dbtxnmgr_query5.q.out
@@ -35,6 +35,7 @@ POSTHOOK: type: CREATEVIEW
 POSTHOOK: Input: foo@t1
 POSTHOOK: Output: database:foo
 POSTHOOK: Output: foo@V1
+POSTHOOK: Lineage: V1.key SIMPLE [(t1)t1.FieldSchema(name:key, type:string, 
comment:null), ]
 PREHOOK: query: show tables
 PREHOOK: type: SHOWTABLES
 PREHOOK: Input: database:foo

http://git-wip-us.apache.org/repos/asf/hive/blob/c7ac3405/ql/src/test/results/clientpositive/describe_formatted_view_partitioned.q.out
----------------------------------------------------------------------
diff --git 
a/ql/src/test/results/clientpositive/describe_formatted_view_partitioned.q.out 
b/ql/src/test/results/clientpositive/describe_formatted_view_partitioned.q.out
index 978df22..c55239b 100644
--- 
a/ql/src/test/results/clientpositive/describe_formatted_view_partitioned.q.out
+++ 
b/ql/src/test/results/clientpositive/describe_formatted_view_partitioned.q.out
@@ -22,6 +22,7 @@ POSTHOOK: type: CREATEVIEW
 POSTHOOK: Input: default@src
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@view_partitioned
+POSTHOOK: Lineage: view_partitioned.key SIMPLE [(src)src.FieldSchema(name:key, 
type:string, comment:default), ]
 PREHOOK: query: ALTER VIEW view_partitioned
 ADD PARTITION (value='val_86')
 PREHOOK: type: ALTERTABLE_ADDPARTS

http://git-wip-us.apache.org/repos/asf/hive/blob/c7ac3405/ql/src/test/results/clientpositive/describe_formatted_view_partitioned_json.q.out
----------------------------------------------------------------------
diff --git 
a/ql/src/test/results/clientpositive/describe_formatted_view_partitioned_json.q.out
 
b/ql/src/test/results/clientpositive/describe_formatted_view_partitioned_json.q.out
index b0bac90..001abb6 100644
--- 
a/ql/src/test/results/clientpositive/describe_formatted_view_partitioned_json.q.out
+++ 
b/ql/src/test/results/clientpositive/describe_formatted_view_partitioned_json.q.out
@@ -22,6 +22,7 @@ POSTHOOK: type: CREATEVIEW
 POSTHOOK: Input: default@src
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@view_partitioned
+POSTHOOK: Lineage: view_partitioned.key SIMPLE [(src)src.FieldSchema(name:key, 
type:string, comment:default), ]
 PREHOOK: query: ALTER VIEW view_partitioned
 ADD PARTITION (value='val_86')
 PREHOOK: type: ALTERTABLE_ADDPARTS

http://git-wip-us.apache.org/repos/asf/hive/blob/c7ac3405/ql/src/test/results/clientpositive/encrypted/encryption_drop_view.q.out
----------------------------------------------------------------------
diff --git 
a/ql/src/test/results/clientpositive/encrypted/encryption_drop_view.q.out 
b/ql/src/test/results/clientpositive/encrypted/encryption_drop_view.q.out
index 7958b39..97c7275 100644
--- a/ql/src/test/results/clientpositive/encrypted/encryption_drop_view.q.out
+++ b/ql/src/test/results/clientpositive/encrypted/encryption_drop_view.q.out
@@ -24,6 +24,8 @@ POSTHOOK: type: CREATEVIEW
 POSTHOOK: Input: default@dve_encrypted_table
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@dve_view
+POSTHOOK: Lineage: dve_view.key SIMPLE 
[(dve_encrypted_table)dve_encrypted_table.FieldSchema(name:key, type:int, 
comment:null), ]
+POSTHOOK: Lineage: dve_view.value SIMPLE 
[(dve_encrypted_table)dve_encrypted_table.FieldSchema(name:value, type:string, 
comment:null), ]
 PREHOOK: query: DROP VIEW dve_view
 PREHOOK: type: DROPVIEW
 PREHOOK: Input: default@dve_view

http://git-wip-us.apache.org/repos/asf/hive/blob/c7ac3405/ql/src/test/results/clientpositive/escape_comments.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/escape_comments.q.out 
b/ql/src/test/results/clientpositive/escape_comments.q.out
index 5965c5e..111c103 100644
--- a/ql/src/test/results/clientpositive/escape_comments.q.out
+++ b/ql/src/test/results/clientpositive/escape_comments.q.out
@@ -34,6 +34,8 @@ POSTHOOK: type: CREATEVIEW
 POSTHOOK: Input: escape_comments_db@escape_comments_tbl1
 POSTHOOK: Output: database:escape_comments_db
 POSTHOOK: Output: escape_comments_db@escape_comments_view1
+POSTHOOK: Lineage: escape_comments_view1.col1 SIMPLE 
[(escape_comments_tbl1)escape_comments_tbl1.FieldSchema(name:col1, type:string, 
comment:a
+b';), ]
 PREHOOK: query: create index index2 on table escape_comments_tbl1(col1) as 
'COMPACT' with deferred rebuild comment 'a\nb'
 PREHOOK: type: CREATEINDEX
 PREHOOK: Input: escape_comments_db@escape_comments_tbl1

http://git-wip-us.apache.org/repos/asf/hive/blob/c7ac3405/ql/src/test/results/clientpositive/explain_ddl.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/explain_ddl.q.out 
b/ql/src/test/results/clientpositive/explain_ddl.q.out
index 6da67e7..ee2a60a 100644
--- a/ql/src/test/results/clientpositive/explain_ddl.q.out
+++ b/ql/src/test/results/clientpositive/explain_ddl.q.out
@@ -8,6 +8,8 @@ POSTHOOK: type: CREATEVIEW
 POSTHOOK: Input: default@src
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@V1
+POSTHOOK: Lineage: V1.key SIMPLE [(src)src.FieldSchema(name:key, type:string, 
comment:default), ]
+POSTHOOK: Lineage: V1.value SIMPLE [(src)src.FieldSchema(name:value, 
type:string, comment:default), ]
 PREHOOK: query: select count(*) from V1 where key > 0
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src

http://git-wip-us.apache.org/repos/asf/hive/blob/c7ac3405/ql/src/test/results/clientpositive/explain_dependency.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/explain_dependency.q.out 
b/ql/src/test/results/clientpositive/explain_dependency.q.out
index 1b18a32..6ab41c7 100644
--- a/ql/src/test/results/clientpositive/explain_dependency.q.out
+++ b/ql/src/test/results/clientpositive/explain_dependency.q.out
@@ -8,6 +8,8 @@ POSTHOOK: type: CREATEVIEW
 POSTHOOK: Input: default@src
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@V1
+POSTHOOK: Lineage: V1.key SIMPLE [(src)src.FieldSchema(name:key, type:string, 
comment:default), ]
+POSTHOOK: Lineage: V1.value SIMPLE [(src)src.FieldSchema(name:value, 
type:string, comment:default), ]
 PREHOOK: query: CREATE VIEW V2 AS SELECT ds, key, value FROM srcpart WHERE ds 
IS NOT NULL
 PREHOOK: type: CREATEVIEW
 PREHOOK: Input: default@srcpart
@@ -18,6 +20,9 @@ POSTHOOK: type: CREATEVIEW
 POSTHOOK: Input: default@srcpart
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@V2
+POSTHOOK: Lineage: V2.ds SIMPLE [(srcpart)srcpart.FieldSchema(name:ds, 
type:string, comment:null), ]
+POSTHOOK: Lineage: V2.key SIMPLE [(srcpart)srcpart.FieldSchema(name:key, 
type:string, comment:default), ]
+POSTHOOK: Lineage: V2.value SIMPLE [(srcpart)srcpart.FieldSchema(name:value, 
type:string, comment:default), ]
 PREHOOK: query: CREATE VIEW V3 AS 
   SELECT src1.key, src2.value FROM V2 src1 
   JOIN src src2 ON src1.key = src2.key WHERE src1.ds IS NOT NULL
@@ -36,6 +41,8 @@ POSTHOOK: Input: default@srcpart
 POSTHOOK: Input: default@v2
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@V3
+POSTHOOK: Lineage: V3.key SIMPLE [(srcpart)srcpart.FieldSchema(name:key, 
type:string, comment:default), ]
+POSTHOOK: Lineage: V3.value SIMPLE [(src)src2.FieldSchema(name:value, 
type:string, comment:default), ]
 PREHOOK: query: CREATE VIEW V4 AS 
   SELECT src1.key, src2.value as value1, src3.value as value2 
   FROM V1 src1 JOIN V2 src2 on src1.key = src2.key JOIN src src3 ON src2.key = 
src3.key
@@ -56,6 +63,9 @@ POSTHOOK: Input: default@v1
 POSTHOOK: Input: default@v2
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@V4
+POSTHOOK: Lineage: V4.key SIMPLE [(src)src.FieldSchema(name:key, type:string, 
comment:default), ]
+POSTHOOK: Lineage: V4.value1 SIMPLE [(srcpart)srcpart.FieldSchema(name:value, 
type:string, comment:default), ]
+POSTHOOK: Lineage: V4.value2 SIMPLE [(src)src3.FieldSchema(name:value, 
type:string, comment:default), ]
 PREHOOK: query: EXPLAIN DEPENDENCY 
   SELECT key, count(1) FROM srcpart WHERE ds IS NOT NULL GROUP BY key
 PREHOOK: type: QUERY
@@ -118,6 +128,10 @@ POSTHOOK: type: CREATEVIEW
 POSTHOOK: Input: default@srcpart
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@V5
+POSTHOOK: Lineage: V5.ds SIMPLE [(srcpart)srcpart.FieldSchema(name:ds, 
type:string, comment:null), ]
+POSTHOOK: Lineage: V5.hr SIMPLE [(srcpart)srcpart.FieldSchema(name:hr, 
type:string, comment:null), ]
+POSTHOOK: Lineage: V5.key SIMPLE [(srcpart)srcpart.FieldSchema(name:key, 
type:string, comment:default), ]
+POSTHOOK: Lineage: V5.value SIMPLE [(srcpart)srcpart.FieldSchema(name:value, 
type:string, comment:default), ]
 PREHOOK: query: EXPLAIN DEPENDENCY SELECT * FROM V5
 PREHOOK: type: QUERY
 POSTHOOK: query: EXPLAIN DEPENDENCY SELECT * FROM V5

http://git-wip-us.apache.org/repos/asf/hive/blob/c7ac3405/ql/src/test/results/clientpositive/explain_logical.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/explain_logical.q.out 
b/ql/src/test/results/clientpositive/explain_logical.q.out
index 90f7aca..d1176c1 100644
--- a/ql/src/test/results/clientpositive/explain_logical.q.out
+++ b/ql/src/test/results/clientpositive/explain_logical.q.out
@@ -8,6 +8,8 @@ POSTHOOK: type: CREATEVIEW
 POSTHOOK: Input: default@src
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@V1
+POSTHOOK: Lineage: V1.key SIMPLE [(src)src.FieldSchema(name:key, type:string, 
comment:default), ]
+POSTHOOK: Lineage: V1.value SIMPLE [(src)src.FieldSchema(name:value, 
type:string, comment:default), ]
 PREHOOK: query: CREATE VIEW V2 AS SELECT ds, key, value FROM srcpart WHERE ds 
IS NOT NULL
 PREHOOK: type: CREATEVIEW
 PREHOOK: Input: default@srcpart
@@ -18,6 +20,9 @@ POSTHOOK: type: CREATEVIEW
 POSTHOOK: Input: default@srcpart
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@V2
+POSTHOOK: Lineage: V2.ds SIMPLE [(srcpart)srcpart.FieldSchema(name:ds, 
type:string, comment:null), ]
+POSTHOOK: Lineage: V2.key SIMPLE [(srcpart)srcpart.FieldSchema(name:key, 
type:string, comment:default), ]
+POSTHOOK: Lineage: V2.value SIMPLE [(srcpart)srcpart.FieldSchema(name:value, 
type:string, comment:default), ]
 PREHOOK: query: CREATE VIEW V3 AS 
   SELECT src1.key, src2.value FROM V2 src1 
   JOIN src src2 ON src1.key = src2.key WHERE src1.ds IS NOT NULL
@@ -36,6 +41,8 @@ POSTHOOK: Input: default@srcpart
 POSTHOOK: Input: default@v2
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@V3
+POSTHOOK: Lineage: V3.key SIMPLE [(srcpart)srcpart.FieldSchema(name:key, 
type:string, comment:default), ]
+POSTHOOK: Lineage: V3.value SIMPLE [(src)src2.FieldSchema(name:value, 
type:string, comment:default), ]
 PREHOOK: query: CREATE VIEW V4 AS 
   SELECT src1.key, src2.value as value1, src3.value as value2 
   FROM V1 src1 JOIN V2 src2 on src1.key = src2.key JOIN src src3 ON src2.key = 
src3.key
@@ -56,6 +63,9 @@ POSTHOOK: Input: default@v1
 POSTHOOK: Input: default@v2
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@V4
+POSTHOOK: Lineage: V4.key SIMPLE [(src)src.FieldSchema(name:key, type:string, 
comment:default), ]
+POSTHOOK: Lineage: V4.value1 SIMPLE [(srcpart)srcpart.FieldSchema(name:value, 
type:string, comment:default), ]
+POSTHOOK: Lineage: V4.value2 SIMPLE [(src)src3.FieldSchema(name:value, 
type:string, comment:default), ]
 PREHOOK: query: EXPLAIN LOGICAL 
   SELECT key, count(1) FROM srcpart WHERE ds IS NOT NULL GROUP BY key
 PREHOOK: type: QUERY
@@ -462,6 +472,10 @@ POSTHOOK: type: CREATEVIEW
 POSTHOOK: Input: default@srcpart
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@V5
+POSTHOOK: Lineage: V5.ds SIMPLE [(srcpart)srcpart.FieldSchema(name:ds, 
type:string, comment:null), ]
+POSTHOOK: Lineage: V5.hr SIMPLE [(srcpart)srcpart.FieldSchema(name:hr, 
type:string, comment:null), ]
+POSTHOOK: Lineage: V5.key SIMPLE [(srcpart)srcpart.FieldSchema(name:key, 
type:string, comment:default), ]
+POSTHOOK: Lineage: V5.value SIMPLE [(srcpart)srcpart.FieldSchema(name:value, 
type:string, comment:default), ]
 PREHOOK: query: EXPLAIN LOGICAL SELECT * FROM V5
 PREHOOK: type: QUERY
 POSTHOOK: query: EXPLAIN LOGICAL SELECT * FROM V5

http://git-wip-us.apache.org/repos/asf/hive/blob/c7ac3405/ql/src/test/results/clientpositive/join_view.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/join_view.q.out 
b/ql/src/test/results/clientpositive/join_view.q.out
index 394706d..1d83742 100644
--- a/ql/src/test/results/clientpositive/join_view.q.out
+++ b/ql/src/test/results/clientpositive/join_view.q.out
@@ -34,6 +34,9 @@ POSTHOOK: Input: default@invites
 POSTHOOK: Input: default@invites2
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@v
+POSTHOOK: Lineage: v.bar SIMPLE [(invites)invites.FieldSchema(name:bar, 
type:string, comment:null), ]
+POSTHOOK: Lineage: v.ds SIMPLE [(invites2)invites2.FieldSchema(name:ds, 
type:string, comment:null), ]
+POSTHOOK: Lineage: v.foo SIMPLE [(invites2)invites2.FieldSchema(name:foo, 
type:int, comment:null), ]
 Warning: Shuffle Join JOIN[8][tables = [$hdt$_0, $hdt$_1]] in Stage 
'Stage-1:MAPRED' is a cross product
 PREHOOK: query: explain select * from v where ds='2011-09-01'
 PREHOOK: type: QUERY

http://git-wip-us.apache.org/repos/asf/hive/blob/c7ac3405/ql/src/test/results/clientpositive/lateral_view_noalias.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/lateral_view_noalias.q.out 
b/ql/src/test/results/clientpositive/lateral_view_noalias.q.out
index 47b1249..25a85a8 100644
--- a/ql/src/test/results/clientpositive/lateral_view_noalias.q.out
+++ b/ql/src/test/results/clientpositive/lateral_view_noalias.q.out
@@ -108,6 +108,8 @@ POSTHOOK: type: CREATEVIEW
 POSTHOOK: Input: default@src
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@lv_noalias
+POSTHOOK: Lineage: lv_noalias.key SCRIPT []
+POSTHOOK: Lineage: lv_noalias.value SCRIPT []
 PREHOOK: query: explain select * from lv_noalias a join lv_noalias b on 
a.key=b.key
 PREHOOK: type: QUERY
 POSTHOOK: query: explain select * from lv_noalias a join lv_noalias b on 
a.key=b.key

http://git-wip-us.apache.org/repos/asf/hive/blob/c7ac3405/ql/src/test/results/clientpositive/lateral_view_onview.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/lateral_view_onview.q.out 
b/ql/src/test/results/clientpositive/lateral_view_onview.q.out
index 6ce31f4..1d3e825 100644
--- a/ql/src/test/results/clientpositive/lateral_view_onview.q.out
+++ b/ql/src/test/results/clientpositive/lateral_view_onview.q.out
@@ -28,6 +28,10 @@ POSTHOOK: type: CREATEVIEW
 POSTHOOK: Input: default@lv_table
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@lv_view
+POSTHOOK: Lineage: lv_view.c1 SIMPLE [(lv_table)lv_table.FieldSchema(name:c1, 
type:string, comment:null), ]
+POSTHOOK: Lineage: lv_view.c2 SIMPLE [(lv_table)lv_table.FieldSchema(name:c2, 
type:array<int>, comment:null), ]
+POSTHOOK: Lineage: lv_view.c3 SIMPLE [(lv_table)lv_table.FieldSchema(name:c3, 
type:int, comment:null), ]
+POSTHOOK: Lineage: lv_view.c4 SIMPLE [(lv_table)lv_table.FieldSchema(name:c4, 
type:char(1), comment:null), ]
 PREHOOK: query: EXPLAIN SELECT * FROM lv_view LATERAL VIEW 
explode(array(1,2,3)) myTable AS myCol SORT BY c1 ASC, myCol ASC LIMIT 1
 PREHOOK: type: QUERY
 POSTHOOK: query: EXPLAIN SELECT * FROM lv_view LATERAL VIEW 
explode(array(1,2,3)) myTable AS myCol SORT BY c1 ASC, myCol ASC LIMIT 1

http://git-wip-us.apache.org/repos/asf/hive/blob/c7ac3405/ql/src/test/results/clientpositive/llap/cbo_rp_unionDistinct_2.q.out
----------------------------------------------------------------------
diff --git 
a/ql/src/test/results/clientpositive/llap/cbo_rp_unionDistinct_2.q.out 
b/ql/src/test/results/clientpositive/llap/cbo_rp_unionDistinct_2.q.out
index 7cc6324..3b3983f 100644
--- a/ql/src/test/results/clientpositive/llap/cbo_rp_unionDistinct_2.q.out
+++ b/ql/src/test/results/clientpositive/llap/cbo_rp_unionDistinct_2.q.out
@@ -338,6 +338,8 @@ POSTHOOK: Input: default@u2
 POSTHOOK: Input: default@u3
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@v
+POSTHOOK: Lineage: v.key EXPRESSION [(u1)u1.FieldSchema(name:key, type:string, 
comment:null), (u2)u2.FieldSchema(name:key, type:string, comment:null), 
(u3)u3.FieldSchema(name:key, type:string, comment:null), ]
+POSTHOOK: Lineage: v.value EXPRESSION [(u1)u1.FieldSchema(name:value, 
type:string, comment:null), (u2)u2.FieldSchema(name:value, type:string, 
comment:null), (u3)u3.FieldSchema(name:value, type:string, comment:null), ]
 PREHOOK: query: describe extended v
 PREHOOK: type: DESCTABLE
 PREHOOK: Input: default@v
@@ -412,6 +414,8 @@ POSTHOOK: Input: default@u1
 POSTHOOK: Input: default@u2
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@v
+POSTHOOK: Lineage: v.key EXPRESSION [(u1)u1.FieldSchema(name:key, type:string, 
comment:null), (u2)u2.FieldSchema(name:key, type:string, comment:null), ]
+POSTHOOK: Lineage: v.value EXPRESSION [(u1)u1.FieldSchema(name:value, 
type:string, comment:null), (u2)u2.FieldSchema(name:value, type:string, 
comment:null), ]
 PREHOOK: query: describe extended v
 PREHOOK: type: DESCTABLE
 PREHOOK: Input: default@v
@@ -477,6 +481,8 @@ POSTHOOK: Input: default@u1
 POSTHOOK: Input: default@u2
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@v
+POSTHOOK: Lineage: v.key EXPRESSION [(u1)u1.FieldSchema(name:key, type:string, 
comment:null), (u2)u2.FieldSchema(name:key, type:string, comment:null), ]
+POSTHOOK: Lineage: v.value EXPRESSION [(u1)u1.FieldSchema(name:value, 
type:string, comment:null), (u2)u2.FieldSchema(name:value, type:string, 
comment:null), ]
 PREHOOK: query: describe extended v
 PREHOOK: type: DESCTABLE
 PREHOOK: Input: default@v

http://git-wip-us.apache.org/repos/asf/hive/blob/c7ac3405/ql/src/test/results/clientpositive/llap/cbo_rp_views.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/cbo_rp_views.q.out 
b/ql/src/test/results/clientpositive/llap/cbo_rp_views.q.out
index e412ee1..2ac2d3a 100644
--- a/ql/src/test/results/clientpositive/llap/cbo_rp_views.q.out
+++ b/ql/src/test/results/clientpositive/llap/cbo_rp_views.q.out
@@ -8,6 +8,10 @@ POSTHOOK: type: CREATEVIEW
 POSTHOOK: Input: default@cbo_t1
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@v1
+POSTHOOK: Lineage: v1.c_boolean SIMPLE 
[(cbo_t1)cbo_t1.FieldSchema(name:c_boolean, type:boolean, comment:null), ]
+POSTHOOK: Lineage: v1.c_int SIMPLE [(cbo_t1)cbo_t1.FieldSchema(name:c_int, 
type:int, comment:null), ]
+POSTHOOK: Lineage: v1.dt SIMPLE [(cbo_t1)cbo_t1.FieldSchema(name:dt, 
type:string, comment:null), ]
+POSTHOOK: Lineage: v1.value SIMPLE [(cbo_t1)cbo_t1.FieldSchema(name:value, 
type:string, comment:null), ]
 PREHOOK: query: create view v2 as select c_int, value from cbo_t2
 PREHOOK: type: CREATEVIEW
 PREHOOK: Input: default@cbo_t2
@@ -18,6 +22,8 @@ POSTHOOK: type: CREATEVIEW
 POSTHOOK: Input: default@cbo_t2
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@v2
+POSTHOOK: Lineage: v2.c_int SIMPLE [(cbo_t2)cbo_t2.FieldSchema(name:c_int, 
type:int, comment:null), ]
+POSTHOOK: Lineage: v2.value SIMPLE [(cbo_t2)cbo_t2.FieldSchema(name:value, 
type:string, comment:null), ]
 PREHOOK: query: select value from v1 where c_boolean=false
 PREHOOK: type: QUERY
 PREHOOK: Input: default@cbo_t1
@@ -108,6 +114,7 @@ POSTHOOK: Input: default@cbo_t1
 POSTHOOK: Input: default@v1
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@v3
+POSTHOOK: Lineage: v3.val SIMPLE [(cbo_t1)cbo_t1.FieldSchema(name:value, 
type:string, comment:null), ]
 PREHOOK: query: select count(val) from v3 where val != '1'
 PREHOOK: type: QUERY
 PREHOOK: Input: default@cbo_t1
@@ -165,6 +172,8 @@ POSTHOOK: type: CREATEVIEW
 POSTHOOK: Input: default@cbo_t1
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@v4
+POSTHOOK: Lineage: v4.c_int SIMPLE [(cbo_t1)cbo_t1.FieldSchema(name:c_int, 
type:int, comment:null), ]
+POSTHOOK: Lineage: v4.key SIMPLE [(cbo_t1)cbo_t1.FieldSchema(name:key, 
type:string, comment:null), ]
 PREHOOK: query: with q1 as ( select c_int from q2 where c_boolean = false),
 q2 as ( select c_int,c_boolean from v1  where value = '1')
 select sum(c_int) from (select c_int from q1) a

http://git-wip-us.apache.org/repos/asf/hive/blob/c7ac3405/ql/src/test/results/clientpositive/llap/cbo_rp_windowing_2.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/cbo_rp_windowing_2.q.out 
b/ql/src/test/results/clientpositive/llap/cbo_rp_windowing_2.q.out
index fe28e1d..d4ab0f9 100644
--- a/ql/src/test/results/clientpositive/llap/cbo_rp_windowing_2.q.out
+++ b/ql/src/test/results/clientpositive/llap/cbo_rp_windowing_2.q.out
@@ -950,6 +950,9 @@ POSTHOOK: type: CREATEVIEW
 POSTHOOK: Input: default@part
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@mfgr_price_view
+POSTHOOK: Lineage: mfgr_price_view.p_brand SIMPLE 
[(part)part.FieldSchema(name:p_brand, type:string, comment:null), ]
+POSTHOOK: Lineage: mfgr_price_view.p_mfgr SIMPLE 
[(part)part.FieldSchema(name:p_mfgr, type:string, comment:null), ]
+POSTHOOK: Lineage: mfgr_price_view.s EXPRESSION 
[(part)part.FieldSchema(name:p_retailprice, type:double, comment:null), ]
 PREHOOK: query: select * 
 from (
 select p_mfgr, p_brand, s, 
@@ -1040,6 +1043,9 @@ POSTHOOK: type: CREATEVIEW
 POSTHOOK: Input: default@part
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@mfgr_brand_price_view
+POSTHOOK: Lineage: mfgr_brand_price_view.p_brand SIMPLE 
[(part)part.FieldSchema(name:p_brand, type:string, comment:null), ]
+POSTHOOK: Lineage: mfgr_brand_price_view.p_mfgr SIMPLE 
[(part)part.FieldSchema(name:p_mfgr, type:string, comment:null), ]
+POSTHOOK: Lineage: mfgr_brand_price_view.s SCRIPT 
[(part)part.FieldSchema(name:p_partkey, type:int, comment:null), 
(part)part.FieldSchema(name:p_name, type:string, comment:null), 
(part)part.FieldSchema(name:p_mfgr, type:string, comment:null), 
(part)part.FieldSchema(name:p_brand, type:string, comment:null), 
(part)part.FieldSchema(name:p_type, type:string, comment:null), 
(part)part.FieldSchema(name:p_size, type:int, comment:null), 
(part)part.FieldSchema(name:p_container, type:string, comment:null), 
(part)part.FieldSchema(name:p_retailprice, type:double, comment:null), 
(part)part.FieldSchema(name:p_comment, type:string, comment:null), ]
 PREHOOK: query: select * from mfgr_brand_price_view
 PREHOOK: type: QUERY
 PREHOOK: Input: default@mfgr_brand_price_view

http://git-wip-us.apache.org/repos/asf/hive/blob/c7ac3405/ql/src/test/results/clientpositive/llap/cbo_subq_exists.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/cbo_subq_exists.q.out 
b/ql/src/test/results/clientpositive/llap/cbo_subq_exists.q.out
index 45f4524..06dbd30 100644
--- a/ql/src/test/results/clientpositive/llap/cbo_subq_exists.q.out
+++ b/ql/src/test/results/clientpositive/llap/cbo_subq_exists.q.out
@@ -195,6 +195,8 @@ POSTHOOK: type: CREATEVIEW
 POSTHOOK: Input: default@src_cbo
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@cv1
+POSTHOOK: Lineage: cv1.key SIMPLE [(src_cbo)b.FieldSchema(name:key, 
type:string, comment:null), ]
+POSTHOOK: Lineage: cv1.value SIMPLE [(src_cbo)b.FieldSchema(name:value, 
type:string, comment:null), ]
 PREHOOK: query: select * from cv1
 PREHOOK: type: QUERY
 PREHOOK: Input: default@cv1

http://git-wip-us.apache.org/repos/asf/hive/blob/c7ac3405/ql/src/test/results/clientpositive/llap/cbo_views.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/cbo_views.q.out 
b/ql/src/test/results/clientpositive/llap/cbo_views.q.out
index e412ee1..2ac2d3a 100644
--- a/ql/src/test/results/clientpositive/llap/cbo_views.q.out
+++ b/ql/src/test/results/clientpositive/llap/cbo_views.q.out
@@ -8,6 +8,10 @@ POSTHOOK: type: CREATEVIEW
 POSTHOOK: Input: default@cbo_t1
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@v1
+POSTHOOK: Lineage: v1.c_boolean SIMPLE 
[(cbo_t1)cbo_t1.FieldSchema(name:c_boolean, type:boolean, comment:null), ]
+POSTHOOK: Lineage: v1.c_int SIMPLE [(cbo_t1)cbo_t1.FieldSchema(name:c_int, 
type:int, comment:null), ]
+POSTHOOK: Lineage: v1.dt SIMPLE [(cbo_t1)cbo_t1.FieldSchema(name:dt, 
type:string, comment:null), ]
+POSTHOOK: Lineage: v1.value SIMPLE [(cbo_t1)cbo_t1.FieldSchema(name:value, 
type:string, comment:null), ]
 PREHOOK: query: create view v2 as select c_int, value from cbo_t2
 PREHOOK: type: CREATEVIEW
 PREHOOK: Input: default@cbo_t2
@@ -18,6 +22,8 @@ POSTHOOK: type: CREATEVIEW
 POSTHOOK: Input: default@cbo_t2
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@v2
+POSTHOOK: Lineage: v2.c_int SIMPLE [(cbo_t2)cbo_t2.FieldSchema(name:c_int, 
type:int, comment:null), ]
+POSTHOOK: Lineage: v2.value SIMPLE [(cbo_t2)cbo_t2.FieldSchema(name:value, 
type:string, comment:null), ]
 PREHOOK: query: select value from v1 where c_boolean=false
 PREHOOK: type: QUERY
 PREHOOK: Input: default@cbo_t1
@@ -108,6 +114,7 @@ POSTHOOK: Input: default@cbo_t1
 POSTHOOK: Input: default@v1
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@v3
+POSTHOOK: Lineage: v3.val SIMPLE [(cbo_t1)cbo_t1.FieldSchema(name:value, 
type:string, comment:null), ]
 PREHOOK: query: select count(val) from v3 where val != '1'
 PREHOOK: type: QUERY
 PREHOOK: Input: default@cbo_t1
@@ -165,6 +172,8 @@ POSTHOOK: type: CREATEVIEW
 POSTHOOK: Input: default@cbo_t1
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@v4
+POSTHOOK: Lineage: v4.c_int SIMPLE [(cbo_t1)cbo_t1.FieldSchema(name:c_int, 
type:int, comment:null), ]
+POSTHOOK: Lineage: v4.key SIMPLE [(cbo_t1)cbo_t1.FieldSchema(name:key, 
type:string, comment:null), ]
 PREHOOK: query: with q1 as ( select c_int from q2 where c_boolean = false),
 q2 as ( select c_int,c_boolean from v1  where value = '1')
 select sum(c_int) from (select c_int from q1) a

http://git-wip-us.apache.org/repos/asf/hive/blob/c7ac3405/ql/src/test/results/clientpositive/llap/cte_2.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/cte_2.q.out 
b/ql/src/test/results/clientpositive/llap/cte_2.q.out
index a0b703f..ef66c40 100644
--- a/ql/src/test/results/clientpositive/llap/cte_2.q.out
+++ b/ql/src/test/results/clientpositive/llap/cte_2.q.out
@@ -118,6 +118,7 @@ POSTHOOK: type: CREATEVIEW
 POSTHOOK: Input: default@src
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@v1
+POSTHOOK: Lineage: v1.key SIMPLE [(src)src.FieldSchema(name:key, type:string, 
comment:default), ]
 PREHOOK: query: select * from v1
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
@@ -153,6 +154,7 @@ POSTHOOK: type: CREATEVIEW
 POSTHOOK: Input: default@src
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@v1
+POSTHOOK: Lineage: v1.key SIMPLE [(src)src.FieldSchema(name:key, type:string, 
comment:default), ]
 PREHOOK: query: with q1 as ( select key from src where key = '4')
 select * from v1
 PREHOOK: type: QUERY
@@ -190,6 +192,8 @@ POSTHOOK: type: CREATEVIEW
 POSTHOOK: Input: default@alltypesorc
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@view_3
+POSTHOOK: Lineage: view_3._c1 EXPRESSION 
[(alltypesorc)alltypesorc.FieldSchema(name:cint, type:int, comment:null), ]
+POSTHOOK: Lineage: view_3.cstring2 SIMPLE 
[(alltypesorc)alltypesorc.FieldSchema(name:cstring2, type:string, 
comment:null), ]
 PREHOOK: query: drop view if exists view_4
 PREHOOK: type: DROPVIEW
 POSTHOOK: query: drop view if exists view_4
@@ -204,3 +208,5 @@ POSTHOOK: type: CREATEVIEW
 POSTHOOK: Input: default@alltypesorc
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@view_4
+POSTHOOK: Lineage: view_4.cstring1 SIMPLE 
[(alltypesorc)s.FieldSchema(name:cstring1, type:string, comment:null), ]
+POSTHOOK: Lineage: view_4.ctimestamp1 SIMPLE 
[(alltypesorc)v.FieldSchema(name:ctimestamp1, type:timestamp, comment:null), ]

http://git-wip-us.apache.org/repos/asf/hive/blob/c7ac3405/ql/src/test/results/clientpositive/llap/cte_4.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/cte_4.q.out 
b/ql/src/test/results/clientpositive/llap/cte_4.q.out
index de976c3..ce92dca 100644
--- a/ql/src/test/results/clientpositive/llap/cte_4.q.out
+++ b/ql/src/test/results/clientpositive/llap/cte_4.q.out
@@ -148,6 +148,7 @@ POSTHOOK: type: CREATEVIEW
 POSTHOOK: Input: default@src
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@v1
+POSTHOOK: Lineage: v1.key SIMPLE [(src)src.FieldSchema(name:key, type:string, 
comment:default), ]
 PREHOOK: query: select * from v1
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
@@ -183,6 +184,7 @@ POSTHOOK: type: CREATEVIEW
 POSTHOOK: Input: default@src
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@v1
+POSTHOOK: Lineage: v1.key SIMPLE [(src)src.FieldSchema(name:key, type:string, 
comment:default), ]
 PREHOOK: query: with q1 as ( select key from src where key = '4')
 select * from v1
 PREHOOK: type: QUERY

http://git-wip-us.apache.org/repos/asf/hive/blob/c7ac3405/ql/src/test/results/clientpositive/llap/explainuser_1.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/explainuser_1.q.out 
b/ql/src/test/results/clientpositive/llap/explainuser_1.q.out
index f79cc35..b9489eb 100644
--- a/ql/src/test/results/clientpositive/llap/explainuser_1.q.out
+++ b/ql/src/test/results/clientpositive/llap/explainuser_1.q.out
@@ -1982,6 +1982,8 @@ POSTHOOK: type: CREATEVIEW
 POSTHOOK: Input: default@src_cbo
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@cv1
+POSTHOOK: Lineage: cv1.key SIMPLE [(src_cbo)b.FieldSchema(name:key, 
type:string, comment:null), ]
+POSTHOOK: Lineage: cv1.value SIMPLE [(src_cbo)b.FieldSchema(name:value, 
type:string, comment:null), ]
 PREHOOK: query: explain select * from cv1
 PREHOOK: type: QUERY
 POSTHOOK: query: explain select * from cv1

http://git-wip-us.apache.org/repos/asf/hive/blob/c7ac3405/ql/src/test/results/clientpositive/llap/multi_column_in.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/multi_column_in.q.out 
b/ql/src/test/results/clientpositive/llap/multi_column_in.q.out
index acbd962..d8f9f03 100644
--- a/ql/src/test/results/clientpositive/llap/multi_column_in.q.out
+++ b/ql/src/test/results/clientpositive/llap/multi_column_in.q.out
@@ -327,6 +327,9 @@ POSTHOOK: type: CREATEVIEW
 POSTHOOK: Input: default@emps
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@v
+POSTHOOK: Lineage: v.deptno EXPRESSION [(emps)emps.FieldSchema(name:deptno, 
type:int, comment:null), ]
+POSTHOOK: Lineage: v.empname EXPRESSION [(emps)emps.FieldSchema(name:empname, 
type:string, comment:null), ]
+POSTHOOK: Lineage: v.empno EXPRESSION [(emps)emps.FieldSchema(name:empno, 
type:int, comment:null), ]
 PREHOOK: query: select * from v
 PREHOOK: type: QUERY
 PREHOOK: Input: default@emps

http://git-wip-us.apache.org/repos/asf/hive/blob/c7ac3405/ql/src/test/results/clientpositive/llap/multi_column_in_single.q.out
----------------------------------------------------------------------
diff --git 
a/ql/src/test/results/clientpositive/llap/multi_column_in_single.q.out 
b/ql/src/test/results/clientpositive/llap/multi_column_in_single.q.out
index 8bbf960..76bc521 100644
--- a/ql/src/test/results/clientpositive/llap/multi_column_in_single.q.out
+++ b/ql/src/test/results/clientpositive/llap/multi_column_in_single.q.out
@@ -290,6 +290,9 @@ POSTHOOK: type: CREATEVIEW
 POSTHOOK: Input: default@emps
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@v
+POSTHOOK: Lineage: v.deptno EXPRESSION [(emps)emps.FieldSchema(name:deptno, 
type:int, comment:null), ]
+POSTHOOK: Lineage: v.empname EXPRESSION [(emps)emps.FieldSchema(name:empname, 
type:string, comment:null), ]
+POSTHOOK: Lineage: v.empno EXPRESSION [(emps)emps.FieldSchema(name:empno, 
type:int, comment:null), ]
 PREHOOK: query: select * from v
 PREHOOK: type: QUERY
 PREHOOK: Input: default@emps

http://git-wip-us.apache.org/repos/asf/hive/blob/c7ac3405/ql/src/test/results/clientpositive/llap/ppd_union_view.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/ppd_union_view.q.out 
b/ql/src/test/results/clientpositive/llap/ppd_union_view.q.out
index 0c474d7..543d176 100644
--- a/ql/src/test/results/clientpositive/llap/ppd_union_view.q.out
+++ b/ql/src/test/results/clientpositive/llap/ppd_union_view.q.out
@@ -128,6 +128,8 @@ POSTHOOK: Input: default@t1_new
 POSTHOOK: Input: default@t1_old
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@t1
+POSTHOOK: Lineage: t1.key EXPRESSION [(t1_new)t1_new.FieldSchema(name:key, 
type:string, comment:null), (t1_mapping)t1_mapping.FieldSchema(name:key, 
type:string, comment:null), ]
+POSTHOOK: Lineage: t1.value EXPRESSION [(t1_new)t1_new.FieldSchema(name:value, 
type:string, comment:null), (t1_old)t1_old.FieldSchema(name:value, type:string, 
comment:null), ]
 PREHOOK: query: explain extended
 select * from t1 where ds = '2011-10-13'
 PREHOOK: type: QUERY

http://git-wip-us.apache.org/repos/asf/hive/blob/c7ac3405/ql/src/test/results/clientpositive/llap/ptf.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/ptf.q.out 
b/ql/src/test/results/clientpositive/llap/ptf.q.out
index 24516fc..df55238 100644
--- a/ql/src/test/results/clientpositive/llap/ptf.q.out
+++ b/ql/src/test/results/clientpositive/llap/ptf.q.out
@@ -2706,6 +2706,9 @@ POSTHOOK: type: CREATEVIEW
 POSTHOOK: Input: default@part
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@mfgr_price_view
+POSTHOOK: Lineage: mfgr_price_view.p_brand SIMPLE 
[(part)part.FieldSchema(name:p_brand, type:string, comment:null), ]
+POSTHOOK: Lineage: mfgr_price_view.p_mfgr SIMPLE 
[(part)part.FieldSchema(name:p_mfgr, type:string, comment:null), ]
+POSTHOOK: Lineage: mfgr_price_view.s EXPRESSION 
[(part)part.FieldSchema(name:p_retailprice, type:double, comment:null), ]
 PREHOOK: query: explain
 select p_mfgr, p_brand, s, 
 round(sum(s) over w1,2)  as s1

http://git-wip-us.apache.org/repos/asf/hive/blob/c7ac3405/ql/src/test/results/clientpositive/llap/selectDistinctStar.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/selectDistinctStar.q.out 
b/ql/src/test/results/clientpositive/llap/selectDistinctStar.q.out
index 6354007..afb9c4f 100644
--- a/ql/src/test/results/clientpositive/llap/selectDistinctStar.q.out
+++ b/ql/src/test/results/clientpositive/llap/selectDistinctStar.q.out
@@ -1366,6 +1366,8 @@ POSTHOOK: type: CREATEVIEW
 POSTHOOK: Input: default@src
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@sdi
+POSTHOOK: Lineage: sdi.key SIMPLE [(src)src.FieldSchema(name:key, type:string, 
comment:default), ]
+POSTHOOK: Lineage: sdi.value SIMPLE [(src)src.FieldSchema(name:value, 
type:string, comment:default), ]
 PREHOOK: query: describe extended sdi
 PREHOOK: type: DESCTABLE
 PREHOOK: Input: default@sdi
@@ -3828,6 +3830,8 @@ POSTHOOK: type: CREATEVIEW
 POSTHOOK: Input: default@src
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@sdi
+POSTHOOK: Lineage: sdi.key SIMPLE [(src)src.FieldSchema(name:key, type:string, 
comment:default), ]
+POSTHOOK: Lineage: sdi.value SIMPLE [(src)src.FieldSchema(name:value, 
type:string, comment:default), ]
 PREHOOK: query: describe extended sdi
 PREHOOK: type: DESCTABLE
 PREHOOK: Input: default@sdi

http://git-wip-us.apache.org/repos/asf/hive/blob/c7ac3405/ql/src/test/results/clientpositive/llap/special_character_in_tabnames_1.q.out
----------------------------------------------------------------------
diff --git 
a/ql/src/test/results/clientpositive/llap/special_character_in_tabnames_1.q.out 
b/ql/src/test/results/clientpositive/llap/special_character_in_tabnames_1.q.out
index 51be593..d01b373 100644
--- 
a/ql/src/test/results/clientpositive/llap/special_character_in_tabnames_1.q.out
+++ 
b/ql/src/test/results/clientpositive/llap/special_character_in_tabnames_1.q.out
@@ -17009,6 +17009,8 @@ POSTHOOK: type: CREATEVIEW
 POSTHOOK: Input: default@src/_/cbo
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@cv1
+POSTHOOK: Lineage: cv1.key SIMPLE [(src/_/cbo)b.FieldSchema(name:key, 
type:string, comment:null), ]
+POSTHOOK: Lineage: cv1.value SIMPLE [(src/_/cbo)b.FieldSchema(name:value, 
type:string, comment:null), ]
 PREHOOK: query: select * from cv1
 PREHOOK: type: QUERY
 PREHOOK: Input: default@cv1
@@ -18764,6 +18766,10 @@ POSTHOOK: type: CREATEVIEW
 POSTHOOK: Input: default@c/b/o_t1
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@v1
+POSTHOOK: Lineage: v1.c_boolean SIMPLE 
[(c/b/o_t1)c/b/o_t1.FieldSchema(name:c_boolean, type:boolean, comment:null), ]
+POSTHOOK: Lineage: v1.c_int SIMPLE [(c/b/o_t1)c/b/o_t1.FieldSchema(name:c_int, 
type:int, comment:null), ]
+POSTHOOK: Lineage: v1.dt SIMPLE [(c/b/o_t1)c/b/o_t1.FieldSchema(name:dt, 
type:string, comment:null), ]
+POSTHOOK: Lineage: v1.value SIMPLE [(c/b/o_t1)c/b/o_t1.FieldSchema(name:value, 
type:string, comment:null), ]
 PREHOOK: query: create view v2 as select c_int, value from `//cbo_t2`
 PREHOOK: type: CREATEVIEW
 PREHOOK: Input: default@//cbo_t2
@@ -18774,6 +18780,8 @@ POSTHOOK: type: CREATEVIEW
 POSTHOOK: Input: default@//cbo_t2
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@v2
+POSTHOOK: Lineage: v2.c_int SIMPLE [(//cbo_t2)//cbo_t2.FieldSchema(name:c_int, 
type:int, comment:null), ]
+POSTHOOK: Lineage: v2.value SIMPLE [(//cbo_t2)//cbo_t2.FieldSchema(name:value, 
type:string, comment:null), ]
 PREHOOK: query: select value from v1 where c_boolean=false
 PREHOOK: type: QUERY
 PREHOOK: Input: default@c/b/o_t1
@@ -18864,6 +18872,7 @@ POSTHOOK: Input: default@c/b/o_t1
 POSTHOOK: Input: default@v1
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@v3
+POSTHOOK: Lineage: v3.val SIMPLE [(c/b/o_t1)c/b/o_t1.FieldSchema(name:value, 
type:string, comment:null), ]
 PREHOOK: query: select count(val) from v3 where val != '1'
 PREHOOK: type: QUERY
 PREHOOK: Input: default@c/b/o_t1
@@ -18929,6 +18938,8 @@ POSTHOOK: type: CREATEVIEW
 POSTHOOK: Input: default@c/b/o_t1
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@v4
+POSTHOOK: Lineage: v4.c_int SIMPLE [(c/b/o_t1)c/b/o_t1.FieldSchema(name:c_int, 
type:int, comment:null), ]
+POSTHOOK: Lineage: v4.key SIMPLE [(c/b/o_t1)c/b/o_t1.FieldSchema(name:key, 
type:string, comment:null), ]
 PREHOOK: query: with q1 as ( select c_int from q2 where c_boolean = false),
 
 q2 as ( select c_int,c_boolean from v1  where value = '1')

http://git-wip-us.apache.org/repos/asf/hive/blob/c7ac3405/ql/src/test/results/clientpositive/llap/subquery_exists.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/subquery_exists.q.out 
b/ql/src/test/results/clientpositive/llap/subquery_exists.q.out
index 4f3d796..14b592b 100644
--- a/ql/src/test/results/clientpositive/llap/subquery_exists.q.out
+++ b/ql/src/test/results/clientpositive/llap/subquery_exists.q.out
@@ -208,6 +208,8 @@ POSTHOOK: type: CREATEVIEW
 POSTHOOK: Input: default@src
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@cv1
+POSTHOOK: Lineage: cv1.key SIMPLE [(src)b.FieldSchema(name:key, type:string, 
comment:default), ]
+POSTHOOK: Lineage: cv1.value SIMPLE [(src)b.FieldSchema(name:value, 
type:string, comment:default), ]
 PREHOOK: query: select * from cv1
 PREHOOK: type: QUERY
 PREHOOK: Input: default@cv1

http://git-wip-us.apache.org/repos/asf/hive/blob/c7ac3405/ql/src/test/results/clientpositive/llap/subquery_notin.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/subquery_notin.q.out 
b/ql/src/test/results/clientpositive/llap/subquery_notin.q.out
index e8ba117..01604da 100644
--- a/ql/src/test/results/clientpositive/llap/subquery_notin.q.out
+++ b/ql/src/test/results/clientpositive/llap/subquery_notin.q.out
@@ -1230,6 +1230,7 @@ POSTHOOK: type: CREATEVIEW
 POSTHOOK: Input: default@src
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@T1_v
+POSTHOOK: Lineage: T1_v.key SIMPLE [(src)src.FieldSchema(name:key, 
type:string, comment:default), ]
 PREHOOK: query: create view T2_v as 
 select case when key > '104' then null else key end as key from T1_v
 PREHOOK: type: CREATEVIEW
@@ -1244,6 +1245,7 @@ POSTHOOK: Input: default@src
 POSTHOOK: Input: default@t1_v
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@T2_v
+POSTHOOK: Lineage: T2_v.key EXPRESSION [(src)src.FieldSchema(name:key, 
type:string, comment:default), ]
 Warning: Shuffle Join MERGEJOIN[33][tables = [$hdt$_0, $hdt$_1]] in Stage 
'Reducer 2' is a cross product
 PREHOOK: query: explain
 select * 

http://git-wip-us.apache.org/repos/asf/hive/blob/c7ac3405/ql/src/test/results/clientpositive/llap/subquery_views.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/subquery_views.q.out 
b/ql/src/test/results/clientpositive/llap/subquery_views.q.out
index 22da51c..d96a5a4 100644
--- a/ql/src/test/results/clientpositive/llap/subquery_views.q.out
+++ b/ql/src/test/results/clientpositive/llap/subquery_views.q.out
@@ -20,6 +20,8 @@ POSTHOOK: type: CREATEVIEW
 POSTHOOK: Input: default@src
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@cv1
+POSTHOOK: Lineage: cv1.key SIMPLE [(src)b.FieldSchema(name:key, type:string, 
comment:default), ]
+POSTHOOK: Lineage: cv1.value SIMPLE [(src)b.FieldSchema(name:value, 
type:string, comment:default), ]
 PREHOOK: query: describe extended cv1
 PREHOOK: type: DESCTABLE
 PREHOOK: Input: default@cv1
@@ -81,6 +83,8 @@ POSTHOOK: type: CREATEVIEW
 POSTHOOK: Input: default@src
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@cv2
+POSTHOOK: Lineage: cv2.key SIMPLE [(src)b.FieldSchema(name:key, type:string, 
comment:default), ]
+POSTHOOK: Lineage: cv2.value SIMPLE [(src)b.FieldSchema(name:value, 
type:string, comment:default), ]
 PREHOOK: query: describe extended cv2
 PREHOOK: type: DESCTABLE
 PREHOOK: Input: default@cv2
@@ -817,6 +821,9 @@ POSTHOOK: type: CREATEVIEW
 POSTHOOK: Input: default@src
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@cv3
+POSTHOOK: Lineage: cv3._c2 EXPRESSION [(src)b.null, ]
+POSTHOOK: Lineage: cv3.key SIMPLE [(src)b.FieldSchema(name:key, type:string, 
comment:default), ]
+POSTHOOK: Lineage: cv3.value SIMPLE [(src)b.FieldSchema(name:value, 
type:string, comment:default), ]
 PREHOOK: query: describe extended cv3
 PREHOOK: type: DESCTABLE
 PREHOOK: Input: default@cv3
@@ -917,6 +924,7 @@ POSTHOOK: type: CREATEVIEW
 POSTHOOK: Input: default@tc
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@tcv
+POSTHOOK: Lineage: tcv.@d SIMPLE [(tc)b.FieldSchema(name:@d, type:int, 
comment:null), ]
 PREHOOK: query: describe extended tcv
 PREHOOK: type: DESCTABLE
 PREHOOK: Input: default@tcv

http://git-wip-us.apache.org/repos/asf/hive/blob/c7ac3405/ql/src/test/results/clientpositive/llap/tez_union.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/tez_union.q.out 
b/ql/src/test/results/clientpositive/llap/tez_union.q.out
index cda74f8..395961e 100644
--- a/ql/src/test/results/clientpositive/llap/tez_union.q.out
+++ b/ql/src/test/results/clientpositive/llap/tez_union.q.out
@@ -1429,6 +1429,8 @@ POSTHOOK: type: CREATEVIEW
 POSTHOOK: Input: default@table1
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@TABLE3
+POSTHOOK: Lineage: TABLE3.emp_id SIMPLE 
[(table1)table1.FieldSchema(name:emp_id, type:int, comment:null), ]
+POSTHOOK: Lineage: TABLE3.emp_name SIMPLE 
[(table1)table1.FieldSchema(name:emp_name, type:string, comment:null), ]
 PREHOOK: query: explain formatted select count(*) from TABLE3
 PREHOOK: type: QUERY
 POSTHOOK: query: explain formatted select count(*) from TABLE3

http://git-wip-us.apache.org/repos/asf/hive/blob/c7ac3405/ql/src/test/results/clientpositive/llap/unionDistinct_2.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/unionDistinct_2.q.out 
b/ql/src/test/results/clientpositive/llap/unionDistinct_2.q.out
index 7cc6324..3b3983f 100644
--- a/ql/src/test/results/clientpositive/llap/unionDistinct_2.q.out
+++ b/ql/src/test/results/clientpositive/llap/unionDistinct_2.q.out
@@ -338,6 +338,8 @@ POSTHOOK: Input: default@u2
 POSTHOOK: Input: default@u3
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@v
+POSTHOOK: Lineage: v.key EXPRESSION [(u1)u1.FieldSchema(name:key, type:string, 
comment:null), (u2)u2.FieldSchema(name:key, type:string, comment:null), 
(u3)u3.FieldSchema(name:key, type:string, comment:null), ]
+POSTHOOK: Lineage: v.value EXPRESSION [(u1)u1.FieldSchema(name:value, 
type:string, comment:null), (u2)u2.FieldSchema(name:value, type:string, 
comment:null), (u3)u3.FieldSchema(name:value, type:string, comment:null), ]
 PREHOOK: query: describe extended v
 PREHOOK: type: DESCTABLE
 PREHOOK: Input: default@v
@@ -412,6 +414,8 @@ POSTHOOK: Input: default@u1
 POSTHOOK: Input: default@u2
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@v
+POSTHOOK: Lineage: v.key EXPRESSION [(u1)u1.FieldSchema(name:key, type:string, 
comment:null), (u2)u2.FieldSchema(name:key, type:string, comment:null), ]
+POSTHOOK: Lineage: v.value EXPRESSION [(u1)u1.FieldSchema(name:value, 
type:string, comment:null), (u2)u2.FieldSchema(name:value, type:string, 
comment:null), ]
 PREHOOK: query: describe extended v
 PREHOOK: type: DESCTABLE
 PREHOOK: Input: default@v
@@ -477,6 +481,8 @@ POSTHOOK: Input: default@u1
 POSTHOOK: Input: default@u2
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@v
+POSTHOOK: Lineage: v.key EXPRESSION [(u1)u1.FieldSchema(name:key, type:string, 
comment:null), (u2)u2.FieldSchema(name:key, type:string, comment:null), ]
+POSTHOOK: Lineage: v.value EXPRESSION [(u1)u1.FieldSchema(name:value, 
type:string, comment:null), (u2)u2.FieldSchema(name:value, type:string, 
comment:null), ]
 PREHOOK: query: describe extended v
 PREHOOK: type: DESCTABLE
 PREHOOK: Input: default@v

http://git-wip-us.apache.org/repos/asf/hive/blob/c7ac3405/ql/src/test/results/clientpositive/llap/union_top_level.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/union_top_level.q.out 
b/ql/src/test/results/clientpositive/llap/union_top_level.q.out
index 14c9dc6..de23f48 100644
--- a/ql/src/test/results/clientpositive/llap/union_top_level.q.out
+++ b/ql/src/test/results/clientpositive/llap/union_top_level.q.out
@@ -1141,6 +1141,8 @@ POSTHOOK: type: CREATEVIEW
 POSTHOOK: Input: default@src
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@union_top_view
+POSTHOOK: Lineage: union_top_view.key EXPRESSION 
[(src)src.FieldSchema(name:key, type:string, comment:default), ]
+POSTHOOK: Lineage: union_top_view.value EXPRESSION []
 PREHOOK: query: select * from union_top_view
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src

Reply via email to