hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hashut...@apache.org
Subject [7/7] hive git commit: HIVE-13112 : Expose Lineage information in case of CTAS (Harish Butani via Ashutosh Chauhan)
Date Wed, 09 Mar 2016 21:32:29 GMT
HIVE-13112 : Expose Lineage information in case of CTAS (Harish Butani via Ashutosh Chauhan)

Signed-off-by: Ashutosh Chauhan <hashutosh@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/hive/repo
Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/fdc9cafe
Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/fdc9cafe
Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/fdc9cafe

Branch: refs/heads/master
Commit: fdc9cafe1f0a609efdfe1f98b06a82559e059ddf
Parents: 5bf324e
Author: Ashutosh Chauhan <hashutosh@apache.org>
Authored: Wed Mar 9 08:47:30 2016 -0800
Committer: Ashutosh Chauhan <hashutosh@apache.org>
Committed: Wed Mar 9 13:31:52 2016 -0800

----------------------------------------------------------------------
 .../org/apache/hadoop/hive/ql/exec/DDLTask.java |   8 ++
 .../hadoop/hive/ql/parse/SemanticAnalyzer.java  |  15 ++-
 .../hadoop/hive/ql/plan/CreateTableDesc.java    |  26 ++++
 .../clientnegative/authorization_part.q.out     |   2 +
 .../clientnegative/authorization_view_1.q.out   |   2 +
 .../clientnegative/authorization_view_2.q.out   |   2 +
 .../clientnegative/authorization_view_3.q.out   |   2 +
 .../clientnegative/authorization_view_4.q.out   |   2 +
 .../authorization_view_disable_cbo_1.q.out      |   2 +
 .../authorization_view_disable_cbo_2.q.out      |   2 +
 .../authorization_view_disable_cbo_3.q.out      |   2 +
 .../authorization_view_disable_cbo_4.q.out      |   2 +
 .../clientnegative/updateBasicStats.q.out       |   2 +
 .../clientpositive/allcolref_in_udf.q.out       |   1 +
 .../alter_rename_partition_authorization.q.out  |   2 +
 .../alter_table_update_status.q.out             |   2 +
 .../clientpositive/annotate_stats_table.q.out   |   1 +
 .../clientpositive/authorization_1.q.out        |   2 +
 .../clientpositive/authorization_2.q.out        |   2 +
 .../clientpositive/authorization_3.q.out        |   2 +
 .../clientpositive/authorization_4.q.out        |   2 +
 .../clientpositive/authorization_6.q.out        |   2 +
 .../authorization_create_temp_table.q.out       |   2 +
 .../clientpositive/authorization_view_1.q.out   |   2 +
 .../authorization_view_disable_cbo_1.q.out      |   2 +
 .../clientpositive/autogen_colalias.q.out       |  22 ++++
 .../cbo_SortUnionTransposeRule.q.out            |   2 +
 .../cbo_rp_cross_product_check_2.q.out          |   4 +
 .../clientpositive/cbo_rp_unionDistinct_2.q.out |   6 +
 .../clientpositive/char_nested_types.q.out      |   2 +
 .../clientpositive/colstats_all_nulls.q.out     |   3 +
 .../clientpositive/create_default_prop.q.out    |   1 +
 .../clientpositive/cross_product_check_1.q.out  |   4 +
 .../clientpositive/cross_product_check_2.q.out  |   4 +
 ql/src/test/results/clientpositive/ctas.q.out   |  12 ++
 .../test/results/clientpositive/ctas_char.q.out |   2 +
 .../results/clientpositive/ctas_colname.q.out   |  21 ++++
 .../test/results/clientpositive/ctas_date.q.out |   4 +
 .../ctas_uses_database_location.q.out           |   2 +
 .../results/clientpositive/ctas_varchar.q.out   |   2 +
 ql/src/test/results/clientpositive/cte_2.q.out  |   1 +
 ql/src/test/results/clientpositive/cte_4.q.out  |   1 +
 .../test/results/clientpositive/database.q.out  |   2 +
 .../results/clientpositive/dbtxnmgr_ddl1.q.out  |   2 +
 .../test/results/clientpositive/decimal_6.q.out |   2 +
 .../results/clientpositive/decimal_join2.q.out  |   2 +
 .../results/clientpositive/decimal_serde.q.out  |   6 +
 .../results/clientpositive/empty_join.q.out     |   2 +
 .../results/clientpositive/explain_ddl.q.out    |   2 +
 .../results/clientpositive/global_limit.q.out   |   1 +
 .../clientpositive/groupby_duplicate_key.q.out  |   3 +
 .../test/results/clientpositive/input46.q.out   |   4 +
 .../test/results/clientpositive/insert0.q.out   |   2 +
 ql/src/test/results/clientpositive/join41.q.out |   2 +
 ql/src/test/results/clientpositive/join42.q.out |  10 ++
 .../clientpositive/join_filters_overlap.q.out   |   2 +
 .../clientpositive/lateral_view_outer.q.out     |   2 +
 .../results/clientpositive/llap/cte_2.q.out     |   1 +
 .../results/clientpositive/llap/cte_4.q.out     |   1 +
 .../llap/dynamic_partition_pruning.q.out        |  10 ++
 .../llap/hybridgrace_hashjoin_1.q.out           |   4 +
 .../clientpositive/llap/llap_nullscan.q.out     |   4 +
 .../results/clientpositive/llap/llap_udf.q.out  |   2 +
 .../clientpositive/llap/llapdecider.q.out       |   2 +
 .../results/clientpositive/llap/tez_dml.q.out   |   4 +
 .../llap/tez_join_result_complex.q.out          |  32 +++++
 .../results/clientpositive/llap/tez_union.q.out |  11 ++
 .../vectorized_dynamic_partition_pruning.q.out  |  10 ++
 .../clientpositive/llap_partitioned.q.out       |   4 +
 .../clientpositive/llap_uncompressed.q.out      |  12 ++
 ql/src/test/results/clientpositive/merge3.q.out |   4 +
 .../multi_insert_lateral_view.q.out             |   2 +
 .../clientpositive/multi_insert_union_src.q.out |   2 +
 .../clientpositive/multi_join_union.q.out       |   8 ++
 .../results/clientpositive/nestedvirtual.q.out  |   9 ++
 .../clientpositive/non_ascii_literal2.q.out     |   2 +
 .../results/clientpositive/nullformatCTAS.q.out |   2 +
 .../results/clientpositive/orc_createas1.q.out  |   5 +
 .../test/results/clientpositive/orc_llap.q.out  |  42 +++++++
 .../clientpositive/parallel_orderby.q.out       |   4 +
 .../results/clientpositive/parquet_ctas.q.out   |   9 ++
 .../results/clientpositive/parquet_join.q.out   |   5 +
 .../parquet_map_null.q.java1.7.out              |   1 +
 .../parquet_map_of_arrays_of_ints.q.out         |   1 +
 .../clientpositive/parquet_map_of_maps.q.out    |   1 +
 .../parquet_mixed_partition_formats2.q.out      |   4 +
 .../clientpositive/parquet_nested_complex.q.out |   5 +
 .../parquet_schema_evolution.q.out              |   2 +
 ...arquet_write_correct_definition_levels.q.out |   1 +
 .../clientpositive/partition_decode_name.q.out  |   2 +
 .../clientpositive/partition_special_char.q.out |   2 +
 .../query_result_fileformat.q.out               |   2 +
 .../clientpositive/rcfile_createas1.q.out       |   3 +
 .../clientpositive/rcfile_default_format.q.out  |   8 ++
 .../sample_islocalmode_hook.q.out               |   4 +
 .../clientpositive/select_same_col.q.out        |   2 +
 .../test/results/clientpositive/semijoin.q.out  |   6 +
 .../test/results/clientpositive/semijoin3.q.out |   4 +
 .../clientpositive/skewjoin_noskew.q.out        |   2 +
 .../clientpositive/skewjoin_onesideskew.q.out   |   2 +
 .../results/clientpositive/smb_mapjoin9.q.out   |   4 +
 .../spark/cross_product_check_1.q.out           |   4 +
 .../spark/cross_product_check_2.q.out           |   4 +
 .../results/clientpositive/spark/ctas.q.out     |  12 ++
 .../results/clientpositive/spark/join41.q.out   |   2 +
 .../spark/join_filters_overlap.q.out            |   2 +
 .../spark/multi_insert_lateral_view.q.out       |   2 +
 .../clientpositive/spark/multi_join_union.q.out |   8 ++
 .../clientpositive/spark/parallel_orderby.q.out |   4 +
 .../clientpositive/spark/parquet_join.q.out     |   5 +
 .../results/clientpositive/spark/semijoin.q.out |   6 +
 .../clientpositive/spark/skewjoin_noskew.q.out  |   2 +
 .../results/clientpositive/spark/stats5.q.out   |   2 +
 .../clientpositive/spark/temp_table_join1.q.out |   2 +
 .../results/clientpositive/spark/union24.q.out  |   8 ++
 .../results/clientpositive/spark/union27.q.out  |   6 +
 .../results/clientpositive/spark/union31.q.out  |   8 ++
 .../results/clientpositive/spark/union32.q.out  |   4 +
 .../clientpositive/spark/union_top_level.q.out  |   2 +
 .../spark/vector_between_in.q.out               |   4 +
 .../spark/vector_decimal_aggregate.q.out        |   4 +
 .../spark/vector_outer_join1.q.out              |  60 ++++++++++
 .../spark/vector_outer_join2.q.out              |  60 ++++++++++
 .../spark/vector_outer_join3.q.out              |  60 ++++++++++
 .../spark/vector_outer_join4.q.out              |  60 ++++++++++
 .../spark/vector_outer_join5.q.out              |   8 ++
 .../spark/vectorization_decimal_date.q.out      |   4 +
 .../spark/vectorization_short_regress.q.out     |  12 ++
 .../special_character_in_tabnames_1.q.out       |   2 +
 ql/src/test/results/clientpositive/stats5.q.out |   2 +
 .../clientpositive/str_to_map.q.java1.7.out     |   1 +
 .../results/clientpositive/temp_table.q.out     |   2 +
 .../clientpositive/temp_table_join1.q.out       |   2 +
 .../tez/cross_product_check_1.q.out             |   4 +
 .../tez/cross_product_check_2.q.out             |   4 +
 .../test/results/clientpositive/tez/ctas.q.out  |  12 ++
 .../test/results/clientpositive/tez/cte_2.q.out |   1 +
 .../test/results/clientpositive/tez/cte_4.q.out |   1 +
 .../tez/dynamic_partition_pruning.q.out         |  10 ++
 .../results/clientpositive/tez/empty_join.q.out |   2 +
 .../clientpositive/tez/explainuser_1.q.out      |   4 +
 .../clientpositive/tez/explainuser_3.q.out      |   2 +
 .../tez/hybridgrace_hashjoin_1.q.out            |   4 +
 .../clientpositive/tez/llap_nullscan.q.out      |   4 +
 .../clientpositive/tez/llapdecider.q.out        |   2 +
 .../results/clientpositive/tez/temp_table.q.out |   2 +
 .../results/clientpositive/tez/tez_dml.q.out    |   4 +
 .../tez/tez_join_result_complex.q.out           |  32 +++++
 .../results/clientpositive/tez/tez_union.q.out  |  11 ++
 .../clientpositive/tez/unionDistinct_1.q.out    |  26 ++++
 .../clientpositive/tez/unionDistinct_2.q.out    |   6 +
 .../clientpositive/tez/union_fast_stats.q.out   | 120 +++++++++++++++++++
 .../tez/vector_between_columns.q.out            |   4 +
 .../clientpositive/tez/vector_between_in.q.out  |   4 +
 .../tez/vector_char_mapjoin1.q.out              |   6 +
 .../tez/vector_decimal_10_0.q.out               |   1 +
 .../clientpositive/tez/vector_decimal_3.q.out   |   2 +
 .../clientpositive/tez/vector_decimal_6.q.out   |   2 +
 .../tez/vector_decimal_aggregate.q.out          |   4 +
 .../tez/vector_decimal_expressions.q.out        |   3 +
 .../tez/vector_decimal_math_funcs.q.out         |   4 +
 .../tez/vector_grouping_sets.q.out              |  29 +++++
 .../tez/vector_interval_mapjoin.q.out           |  26 ++++
 .../clientpositive/tez/vector_join30.q.out      |   2 +
 .../tez/vector_join_filters.q.out               |   2 +
 .../clientpositive/tez/vector_join_nulls.q.out  |   2 +
 .../tez/vector_leftsemi_mapjoin.q.out           |   6 +
 .../tez/vector_multi_insert.q.out               |   1 +
 .../tez/vector_nullsafe_join.q.out              |   2 +
 .../clientpositive/tez/vector_outer_join1.q.out |  60 ++++++++++
 .../clientpositive/tez/vector_outer_join2.q.out |  60 ++++++++++
 .../clientpositive/tez/vector_outer_join3.q.out |  60 ++++++++++
 .../clientpositive/tez/vector_outer_join4.q.out |  60 ++++++++++
 .../clientpositive/tez/vector_outer_join5.q.out |   8 ++
 .../clientpositive/tez/vector_outer_join6.q.out |  12 ++
 .../tez/vector_partitioned_date_time.q.out      |   6 +
 .../tez/vector_reduce_groupby_decimal.q.out     |   4 +
 .../tez/vector_varchar_mapjoin1.q.out           |   6 +
 .../tez/vectorization_decimal_date.q.out        |   4 +
 .../tez/vectorization_short_regress.q.out       |  12 ++
 .../vectorized_dynamic_partition_pruning.q.out  |  10 ++
 .../clientpositive/udf_unix_timestamp.q.out     |   2 +
 .../test/results/clientpositive/union24.q.out   |   8 ++
 .../test/results/clientpositive/union27.q.out   |   6 +
 .../test/results/clientpositive/union31.q.out   |   8 ++
 .../test/results/clientpositive/union32.q.out   |   4 +
 .../clientpositive/unionDistinct_1.q.out        |  26 ++++
 .../clientpositive/unionDistinct_2.q.out        |   6 +
 .../clientpositive/union_fast_stats.q.out       | 120 +++++++++++++++++++
 .../clientpositive/union_top_level.q.out        |   2 +
 .../clientpositive/updateAccessTime.q.out       |   2 +
 .../clientpositive/updateBasicStats.q.out       |   2 +
 .../clientpositive/varchar_nested_types.q.out   |   2 +
 .../clientpositive/vector_between_columns.q.out |   4 +
 .../clientpositive/vector_between_in.q.out      |   4 +
 .../clientpositive/vector_char_mapjoin1.q.out   |   6 +
 .../clientpositive/vector_decimal_10_0.q.out    |   1 +
 .../clientpositive/vector_decimal_3.q.out       |   2 +
 .../clientpositive/vector_decimal_6.q.out       |   2 +
 .../vector_decimal_aggregate.q.out              |   4 +
 .../vector_decimal_expressions.q.out            |   3 +
 .../vector_decimal_math_funcs.q.out             |   4 +
 .../clientpositive/vector_grouping_sets.q.out   |  29 +++++
 .../vector_interval_mapjoin.q.out               |  26 ++++
 .../results/clientpositive/vector_join30.q.out  |   2 +
 .../clientpositive/vector_join_filters.q.out    |   2 +
 .../clientpositive/vector_join_nulls.q.out      |   2 +
 .../vector_leftsemi_mapjoin.q.out               |   6 +
 .../clientpositive/vector_multi_insert.q.out    |   1 +
 .../clientpositive/vector_nullsafe_join.q.out   |   2 +
 .../clientpositive/vector_outer_join1.q.out     |  60 ++++++++++
 .../clientpositive/vector_outer_join2.q.out     |  60 ++++++++++
 .../clientpositive/vector_outer_join3.q.out     |  60 ++++++++++
 .../clientpositive/vector_outer_join4.q.out     |  60 ++++++++++
 .../clientpositive/vector_outer_join5.q.out     |   8 ++
 .../clientpositive/vector_outer_join6.q.out     |  12 ++
 .../vector_partitioned_date_time.q.out          |   6 +
 .../vector_reduce_groupby_decimal.q.out         |   4 +
 .../vector_varchar_mapjoin1.q.out               |   6 +
 .../vectorization_decimal_date.q.out            |   4 +
 .../vectorization_short_regress.q.out           |  12 ++
 .../clientpositive/windowing_navfn.q.out        |   2 +
 .../clientpositive/windowing_streaming.q.out    |   6 +
 223 files changed, 2079 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/fdc9cafe/ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java b/ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java
index c51cfd6..2a64cfa 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java
@@ -93,6 +93,7 @@ import org.apache.hadoop.hive.ql.ErrorMsg;
 import org.apache.hadoop.hive.ql.QueryPlan;
 import org.apache.hadoop.hive.ql.exec.ArchiveUtils.PartSpecInfo;
 import org.apache.hadoop.hive.ql.exec.tez.TezTask;
+import org.apache.hadoop.hive.ql.hooks.LineageInfo.DataContainer;
 import org.apache.hadoop.hive.ql.hooks.ReadEntity;
 import org.apache.hadoop.hive.ql.hooks.WriteEntity;
 import org.apache.hadoop.hive.ql.io.AcidUtils;
@@ -3919,6 +3920,13 @@ public class DDLTask extends Task<DDLWork> implements Serializable {
       }
     } else {
       db.createTable(tbl, crtTbl.getIfNotExists());
+      if ( crtTbl.isCTAS()) {
+        Table createdTable = db.getTable(tbl.getDbName(), tbl.getTableName());
+        DataContainer dc = new DataContainer(createdTable.getTTable());
+        SessionState.get().getLineageState().setLineage(
+                createdTable.getPath(), dc, createdTable.getCols()
+        );
+      }
     }
     work.getOutputs().add(new WriteEntity(tbl, WriteEntity.WriteType.DDL_NO_LOCK));
     return 0;

http://git-wip-us.apache.org/repos/asf/hive/blob/fdc9cafe/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java b/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java
index 9ab091d..633c212 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java
@@ -6910,6 +6910,19 @@ public class SemanticAnalyzer extends BaseSemanticAnalyzer {
     if (ltd != null && SessionState.get() != null) {
       SessionState.get().getLineageState()
           .mapDirToFop(ltd.getSourcePath(), (FileSinkOperator) output);
+    } else if ( SessionState.get().getCommandType().equals(HiveOperation.CREATETABLE_AS_SELECT.getOperationName())) {
+
+      Path tlocation = null;
+      String tName = Utilities.getDbTableName(tableDesc.getTableName())[1];
+      try {
+        Warehouse wh = new Warehouse(conf);
+        tlocation = wh.getTablePath(db.getDatabase(tableDesc.getDatabaseName()), tName);
+      } catch (MetaException|HiveException e) {
+        throw new SemanticException(e);
+      }
+
+      SessionState.get().getLineageState()
+              .mapDirToFop(tlocation, (FileSinkOperator) output);
     }
 
     if (LOG.isDebugEnabled()) {
@@ -11341,7 +11354,7 @@ public class SemanticAnalyzer extends BaseSemanticAnalyzer {
           rowFormatParams.lineDelim, comment, storageFormat.getInputFormat(),
           storageFormat.getOutputFormat(), location, storageFormat.getSerde(),
           storageFormat.getStorageHandler(), storageFormat.getSerdeProps(), tblProps, ifNotExists,
-          skewedColNames, skewedValues);
+          skewedColNames, skewedValues, true);
       tableDesc.setMaterialization(isMaterialization);
       tableDesc.setStoredAsSubDirectories(storedAsDirs);
       tableDesc.setNullFormat(rowFormatParams.nullFormat);

http://git-wip-us.apache.org/repos/asf/hive/blob/fdc9cafe/ql/src/java/org/apache/hadoop/hive/ql/plan/CreateTableDesc.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/plan/CreateTableDesc.java b/ql/src/java/org/apache/hadoop/hive/ql/plan/CreateTableDesc.java
index 8b2ac3b..03b4d8b 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/plan/CreateTableDesc.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/plan/CreateTableDesc.java
@@ -87,6 +87,7 @@ public class CreateTableDesc extends DDLDesc implements Serializable {
   boolean isTemporary = false;
   private boolean isMaterialization = false;
   private boolean replaceMode = false;
+  private boolean isCTAS = false;
 
   public CreateTableDesc() {
   }
@@ -111,6 +112,27 @@ public class CreateTableDesc extends DDLDesc implements Serializable {
     this.databaseName = databaseName;
   }
 
+  public CreateTableDesc(String databaseName, String tableName, boolean isExternal, boolean isTemporary,
+                         List<FieldSchema> cols, List<FieldSchema> partCols,
+                         List<String> bucketCols, List<Order> sortCols, int numBuckets,
+                         String fieldDelim, String fieldEscape, String collItemDelim,
+                         String mapKeyDelim, String lineDelim, String comment, String inputFormat,
+                         String outputFormat, String location, String serName,
+                         String storageHandler,
+                         Map<String, String> serdeProps,
+                         Map<String, String> tblProps,
+                         boolean ifNotExists, List<String> skewedColNames, List<List<String>> skewedColValues,
+                         boolean isCTAS) {
+    this(databaseName, tableName, isExternal, isTemporary, cols, partCols,
+            bucketCols, sortCols, numBuckets, fieldDelim, fieldEscape,
+            collItemDelim, mapKeyDelim, lineDelim, comment, inputFormat,
+            outputFormat, location, serName, storageHandler, serdeProps,
+            tblProps, ifNotExists, skewedColNames, skewedColValues);
+    this.isCTAS = isCTAS;
+
+  }
+
+
   public CreateTableDesc(String tableName, boolean isExternal, boolean isTemporary,
       List<FieldSchema> cols, List<FieldSchema> partCols,
       List<String> bucketCols, List<Order> sortCols, int numBuckets,
@@ -589,6 +611,10 @@ public class CreateTableDesc extends DDLDesc implements Serializable {
     return replaceMode;
   }
 
+  public boolean isCTAS() {
+    return isCTAS;
+  }
+
   public Table toTable(HiveConf conf) throws HiveException {
     String databaseName = getDatabaseName();
     String tableName = getTableName();

http://git-wip-us.apache.org/repos/asf/hive/blob/fdc9cafe/ql/src/test/results/clientnegative/authorization_part.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientnegative/authorization_part.q.out b/ql/src/test/results/clientnegative/authorization_part.q.out
index 6238782..7a31214 100644
--- a/ql/src/test/results/clientnegative/authorization_part.q.out
+++ b/ql/src/test/results/clientnegative/authorization_part.q.out
@@ -28,6 +28,8 @@ POSTHOOK: type: CREATETABLE_AS_SELECT
 POSTHOOK: Input: default@src
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@src_auth
+POSTHOOK: Lineage: src_auth.key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
+POSTHOOK: Lineage: src_auth.value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
 PREHOOK: query: grant Create on table authorization_part_fail to user hive_test_user
 PREHOOK: type: GRANT_PRIVILEGE
 PREHOOK: Output: default@authorization_part_fail

http://git-wip-us.apache.org/repos/asf/hive/blob/fdc9cafe/ql/src/test/results/clientnegative/authorization_view_1.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientnegative/authorization_view_1.q.out b/ql/src/test/results/clientnegative/authorization_view_1.q.out
index 2feb0d8..72b134f 100644
--- a/ql/src/test/results/clientnegative/authorization_view_1.q.out
+++ b/ql/src/test/results/clientnegative/authorization_view_1.q.out
@@ -8,6 +8,8 @@ POSTHOOK: type: CREATETABLE_AS_SELECT
 POSTHOOK: Input: default@src
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@src_autho_test
+POSTHOOK: Lineage: src_autho_test.key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
+POSTHOOK: Lineage: src_autho_test.value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
 PREHOOK: query: create view v as select * from src_autho_test
 PREHOOK: type: CREATEVIEW
 PREHOOK: Input: default@src_autho_test

http://git-wip-us.apache.org/repos/asf/hive/blob/fdc9cafe/ql/src/test/results/clientnegative/authorization_view_2.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientnegative/authorization_view_2.q.out b/ql/src/test/results/clientnegative/authorization_view_2.q.out
index 0f8bd13..e905299 100644
--- a/ql/src/test/results/clientnegative/authorization_view_2.q.out
+++ b/ql/src/test/results/clientnegative/authorization_view_2.q.out
@@ -8,6 +8,8 @@ POSTHOOK: type: CREATETABLE_AS_SELECT
 POSTHOOK: Input: default@src
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@src_autho_test
+POSTHOOK: Lineage: src_autho_test.key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
+POSTHOOK: Lineage: src_autho_test.value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
 PREHOOK: query: create view v as select * from src_autho_test
 PREHOOK: type: CREATEVIEW
 PREHOOK: Input: default@src_autho_test

http://git-wip-us.apache.org/repos/asf/hive/blob/fdc9cafe/ql/src/test/results/clientnegative/authorization_view_3.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientnegative/authorization_view_3.q.out b/ql/src/test/results/clientnegative/authorization_view_3.q.out
index e6d2352..3e8f98d 100644
--- a/ql/src/test/results/clientnegative/authorization_view_3.q.out
+++ b/ql/src/test/results/clientnegative/authorization_view_3.q.out
@@ -8,6 +8,8 @@ POSTHOOK: type: CREATETABLE_AS_SELECT
 POSTHOOK: Input: default@src
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@src_autho_test
+POSTHOOK: Lineage: src_autho_test.key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
+POSTHOOK: Lineage: src_autho_test.value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
 PREHOOK: query: create view v as select * from src_autho_test
 PREHOOK: type: CREATEVIEW
 PREHOOK: Input: default@src_autho_test

http://git-wip-us.apache.org/repos/asf/hive/blob/fdc9cafe/ql/src/test/results/clientnegative/authorization_view_4.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientnegative/authorization_view_4.q.out b/ql/src/test/results/clientnegative/authorization_view_4.q.out
index 371d407..dbcc769 100644
--- a/ql/src/test/results/clientnegative/authorization_view_4.q.out
+++ b/ql/src/test/results/clientnegative/authorization_view_4.q.out
@@ -8,6 +8,8 @@ POSTHOOK: type: CREATETABLE_AS_SELECT
 POSTHOOK: Input: default@src
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@src_autho_test
+POSTHOOK: Lineage: src_autho_test.key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
+POSTHOOK: Lineage: src_autho_test.value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
 PREHOOK: query: create view v as select * from src_autho_test
 PREHOOK: type: CREATEVIEW
 PREHOOK: Input: default@src_autho_test

http://git-wip-us.apache.org/repos/asf/hive/blob/fdc9cafe/ql/src/test/results/clientnegative/authorization_view_disable_cbo_1.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientnegative/authorization_view_disable_cbo_1.q.out b/ql/src/test/results/clientnegative/authorization_view_disable_cbo_1.q.out
index 2feb0d8..72b134f 100644
--- a/ql/src/test/results/clientnegative/authorization_view_disable_cbo_1.q.out
+++ b/ql/src/test/results/clientnegative/authorization_view_disable_cbo_1.q.out
@@ -8,6 +8,8 @@ POSTHOOK: type: CREATETABLE_AS_SELECT
 POSTHOOK: Input: default@src
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@src_autho_test
+POSTHOOK: Lineage: src_autho_test.key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
+POSTHOOK: Lineage: src_autho_test.value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
 PREHOOK: query: create view v as select * from src_autho_test
 PREHOOK: type: CREATEVIEW
 PREHOOK: Input: default@src_autho_test

http://git-wip-us.apache.org/repos/asf/hive/blob/fdc9cafe/ql/src/test/results/clientnegative/authorization_view_disable_cbo_2.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientnegative/authorization_view_disable_cbo_2.q.out b/ql/src/test/results/clientnegative/authorization_view_disable_cbo_2.q.out
index 0f8bd13..e905299 100644
--- a/ql/src/test/results/clientnegative/authorization_view_disable_cbo_2.q.out
+++ b/ql/src/test/results/clientnegative/authorization_view_disable_cbo_2.q.out
@@ -8,6 +8,8 @@ POSTHOOK: type: CREATETABLE_AS_SELECT
 POSTHOOK: Input: default@src
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@src_autho_test
+POSTHOOK: Lineage: src_autho_test.key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
+POSTHOOK: Lineage: src_autho_test.value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
 PREHOOK: query: create view v as select * from src_autho_test
 PREHOOK: type: CREATEVIEW
 PREHOOK: Input: default@src_autho_test

http://git-wip-us.apache.org/repos/asf/hive/blob/fdc9cafe/ql/src/test/results/clientnegative/authorization_view_disable_cbo_3.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientnegative/authorization_view_disable_cbo_3.q.out b/ql/src/test/results/clientnegative/authorization_view_disable_cbo_3.q.out
index e6d2352..3e8f98d 100644
--- a/ql/src/test/results/clientnegative/authorization_view_disable_cbo_3.q.out
+++ b/ql/src/test/results/clientnegative/authorization_view_disable_cbo_3.q.out
@@ -8,6 +8,8 @@ POSTHOOK: type: CREATETABLE_AS_SELECT
 POSTHOOK: Input: default@src
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@src_autho_test
+POSTHOOK: Lineage: src_autho_test.key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
+POSTHOOK: Lineage: src_autho_test.value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
 PREHOOK: query: create view v as select * from src_autho_test
 PREHOOK: type: CREATEVIEW
 PREHOOK: Input: default@src_autho_test

http://git-wip-us.apache.org/repos/asf/hive/blob/fdc9cafe/ql/src/test/results/clientnegative/authorization_view_disable_cbo_4.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientnegative/authorization_view_disable_cbo_4.q.out b/ql/src/test/results/clientnegative/authorization_view_disable_cbo_4.q.out
index 371d407..dbcc769 100644
--- a/ql/src/test/results/clientnegative/authorization_view_disable_cbo_4.q.out
+++ b/ql/src/test/results/clientnegative/authorization_view_disable_cbo_4.q.out
@@ -8,6 +8,8 @@ POSTHOOK: type: CREATETABLE_AS_SELECT
 POSTHOOK: Input: default@src
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@src_autho_test
+POSTHOOK: Lineage: src_autho_test.key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
+POSTHOOK: Lineage: src_autho_test.value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
 PREHOOK: query: create view v as select * from src_autho_test
 PREHOOK: type: CREATEVIEW
 PREHOOK: Input: default@src_autho_test

http://git-wip-us.apache.org/repos/asf/hive/blob/fdc9cafe/ql/src/test/results/clientnegative/updateBasicStats.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientnegative/updateBasicStats.q.out b/ql/src/test/results/clientnegative/updateBasicStats.q.out
index 3c4fe39..89196e0 100644
--- a/ql/src/test/results/clientnegative/updateBasicStats.q.out
+++ b/ql/src/test/results/clientnegative/updateBasicStats.q.out
@@ -8,4 +8,6 @@ POSTHOOK: type: CREATETABLE_AS_SELECT
 POSTHOOK: Input: default@src
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@s
+POSTHOOK: Lineage: s.key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
+POSTHOOK: Lineage: s.value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
 FAILED: SemanticException AlterTable numRows failed with value NaN

http://git-wip-us.apache.org/repos/asf/hive/blob/fdc9cafe/ql/src/test/results/clientpositive/allcolref_in_udf.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/allcolref_in_udf.q.out b/ql/src/test/results/clientpositive/allcolref_in_udf.q.out
index 1410d5e..eda49ed 100644
--- a/ql/src/test/results/clientpositive/allcolref_in_udf.q.out
+++ b/ql/src/test/results/clientpositive/allcolref_in_udf.q.out
@@ -172,6 +172,7 @@ POSTHOOK: type: CREATETABLE_AS_SELECT
 POSTHOOK: Input: default@src
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@allcolref
+POSTHOOK: Lineage: allcolref.c0 EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), (src)src.FieldSchema(name:value, type:string, comment:default), ]
 PREHOOK: query: explain select explode(*) as x from allcolref limit 10
 PREHOOK: type: QUERY
 POSTHOOK: query: explain select explode(*) as x from allcolref limit 10

http://git-wip-us.apache.org/repos/asf/hive/blob/fdc9cafe/ql/src/test/results/clientpositive/alter_rename_partition_authorization.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/alter_rename_partition_authorization.q.out b/ql/src/test/results/clientpositive/alter_rename_partition_authorization.q.out
index d35bf40..79489ad 100644
--- a/ql/src/test/results/clientpositive/alter_rename_partition_authorization.q.out
+++ b/ql/src/test/results/clientpositive/alter_rename_partition_authorization.q.out
@@ -12,6 +12,8 @@ POSTHOOK: type: CREATETABLE_AS_SELECT
 POSTHOOK: Input: default@src
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@src_auth_tmp
+POSTHOOK: Lineage: src_auth_tmp.key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
+POSTHOOK: Lineage: src_auth_tmp.value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
 PREHOOK: query: create table authorization_part (key int, value string) partitioned by (ds string)
 PREHOOK: type: CREATETABLE
 PREHOOK: Output: database:default

http://git-wip-us.apache.org/repos/asf/hive/blob/fdc9cafe/ql/src/test/results/clientpositive/alter_table_update_status.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/alter_table_update_status.q.out b/ql/src/test/results/clientpositive/alter_table_update_status.q.out
index e30946f..6bb6e8e 100644
--- a/ql/src/test/results/clientpositive/alter_table_update_status.q.out
+++ b/ql/src/test/results/clientpositive/alter_table_update_status.q.out
@@ -8,6 +8,8 @@ POSTHOOK: type: CREATETABLE_AS_SELECT
 POSTHOOK: Input: default@src1
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@src_stat
+POSTHOOK: Lineage: src_stat.key SIMPLE [(src1)src1.FieldSchema(name:key, type:string, comment:default), ]
+POSTHOOK: Lineage: src_stat.value SIMPLE [(src1)src1.FieldSchema(name:value, type:string, comment:default), ]
 PREHOOK: query: create table src_stat_int (
   key         double,
   value       string

http://git-wip-us.apache.org/repos/asf/hive/blob/fdc9cafe/ql/src/test/results/clientpositive/annotate_stats_table.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/annotate_stats_table.q.out b/ql/src/test/results/clientpositive/annotate_stats_table.q.out
index cec3a1f..6db4ded 100644
--- a/ql/src/test/results/clientpositive/annotate_stats_table.q.out
+++ b/ql/src/test/results/clientpositive/annotate_stats_table.q.out
@@ -299,6 +299,7 @@ POSTHOOK: type: CREATETABLE_AS_SELECT
 POSTHOOK: Input: _dummy_database@_dummy_table
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@tmp
+POSTHOOK: Lineage: tmp._c0 SIMPLE []
 PREHOOK: query: explain create table tmp as select 1
 PREHOOK: type: CREATETABLE_AS_SELECT
 POSTHOOK: query: explain create table tmp as select 1

http://git-wip-us.apache.org/repos/asf/hive/blob/fdc9cafe/ql/src/test/results/clientpositive/authorization_1.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/authorization_1.q.out b/ql/src/test/results/clientpositive/authorization_1.q.out
index f9f1b34..5d73485 100644
--- a/ql/src/test/results/clientpositive/authorization_1.q.out
+++ b/ql/src/test/results/clientpositive/authorization_1.q.out
@@ -12,6 +12,8 @@ POSTHOOK: type: CREATETABLE_AS_SELECT
 POSTHOOK: Input: default@src
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@src_autho_test
+POSTHOOK: Lineage: src_autho_test.key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
+POSTHOOK: Lineage: src_autho_test.value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
 PREHOOK: query: --table grant to user
 
 grant select on table src_autho_test to user hive_test_user

http://git-wip-us.apache.org/repos/asf/hive/blob/fdc9cafe/ql/src/test/results/clientpositive/authorization_2.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/authorization_2.q.out b/ql/src/test/results/clientpositive/authorization_2.q.out
index e92763c..449cd02 100644
--- a/ql/src/test/results/clientpositive/authorization_2.q.out
+++ b/ql/src/test/results/clientpositive/authorization_2.q.out
@@ -20,6 +20,8 @@ POSTHOOK: type: CREATETABLE_AS_SELECT
 POSTHOOK: Input: default@src
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@src_auth_tmp
+POSTHOOK: Lineage: src_auth_tmp.key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
+POSTHOOK: Lineage: src_auth_tmp.value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
 PREHOOK: query: ALTER TABLE authorization_part SET TBLPROPERTIES ("PARTITION_LEVEL_PRIVILEGE"="TRUE")
 PREHOOK: type: ALTERTABLE_PROPERTIES
 PREHOOK: Input: default@authorization_part

http://git-wip-us.apache.org/repos/asf/hive/blob/fdc9cafe/ql/src/test/results/clientpositive/authorization_3.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/authorization_3.q.out b/ql/src/test/results/clientpositive/authorization_3.q.out
index 2b53233..14c1466 100644
--- a/ql/src/test/results/clientpositive/authorization_3.q.out
+++ b/ql/src/test/results/clientpositive/authorization_3.q.out
@@ -12,6 +12,8 @@ POSTHOOK: type: CREATETABLE_AS_SELECT
 POSTHOOK: Input: default@src
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@src_autho_test
+POSTHOOK: Lineage: src_autho_test.key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
+POSTHOOK: Lineage: src_autho_test.value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
 PREHOOK: query: grant drop on table src_autho_test to user hive_test_user
 PREHOOK: type: GRANT_PRIVILEGE
 PREHOOK: Output: default@src_autho_test

http://git-wip-us.apache.org/repos/asf/hive/blob/fdc9cafe/ql/src/test/results/clientpositive/authorization_4.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/authorization_4.q.out b/ql/src/test/results/clientpositive/authorization_4.q.out
index 67a30fd..7bf00cd 100644
--- a/ql/src/test/results/clientpositive/authorization_4.q.out
+++ b/ql/src/test/results/clientpositive/authorization_4.q.out
@@ -12,6 +12,8 @@ POSTHOOK: type: CREATETABLE_AS_SELECT
 POSTHOOK: Input: default@src
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@src_autho_test
+POSTHOOK: Lineage: src_autho_test.key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
+POSTHOOK: Lineage: src_autho_test.value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
 PREHOOK: query: grant All on table src_autho_test to user hive_test_user
 PREHOOK: type: GRANT_PRIVILEGE
 PREHOOK: Output: default@src_autho_test

http://git-wip-us.apache.org/repos/asf/hive/blob/fdc9cafe/ql/src/test/results/clientpositive/authorization_6.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/authorization_6.q.out b/ql/src/test/results/clientpositive/authorization_6.q.out
index 0341094..bfe9f76 100644
--- a/ql/src/test/results/clientpositive/authorization_6.q.out
+++ b/ql/src/test/results/clientpositive/authorization_6.q.out
@@ -12,6 +12,8 @@ POSTHOOK: type: CREATETABLE_AS_SELECT
 POSTHOOK: Input: default@src
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@src_auth_tmp
+POSTHOOK: Lineage: src_auth_tmp.key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
+POSTHOOK: Lineage: src_auth_tmp.value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
 PREHOOK: query: create table authorization_part (key int, value string) partitioned by (ds string)
 PREHOOK: type: CREATETABLE
 PREHOOK: Output: database:default

http://git-wip-us.apache.org/repos/asf/hive/blob/fdc9cafe/ql/src/test/results/clientpositive/authorization_create_temp_table.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/authorization_create_temp_table.q.out b/ql/src/test/results/clientpositive/authorization_create_temp_table.q.out
index c87862d..6b2c74c 100644
--- a/ql/src/test/results/clientpositive/authorization_create_temp_table.q.out
+++ b/ql/src/test/results/clientpositive/authorization_create_temp_table.q.out
@@ -8,6 +8,8 @@ POSTHOOK: type: CREATETABLE_AS_SELECT
 POSTHOOK: Input: default@src
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@authorization_create_temp_table_1
+POSTHOOK: Lineage: authorization_create_temp_table_1.key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
+POSTHOOK: Lineage: authorization_create_temp_table_1.value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
 PREHOOK: query: grant select on authorization_create_temp_table_1 to user user1
 PREHOOK: type: GRANT_PRIVILEGE
 PREHOOK: Output: default@authorization_create_temp_table_1

http://git-wip-us.apache.org/repos/asf/hive/blob/fdc9cafe/ql/src/test/results/clientpositive/authorization_view_1.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/authorization_view_1.q.out b/ql/src/test/results/clientpositive/authorization_view_1.q.out
index 0703c4f..01ce416 100644
--- a/ql/src/test/results/clientpositive/authorization_view_1.q.out
+++ b/ql/src/test/results/clientpositive/authorization_view_1.q.out
@@ -8,6 +8,8 @@ POSTHOOK: type: CREATETABLE_AS_SELECT
 POSTHOOK: Input: default@src
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@src_autho_test
+POSTHOOK: Lineage: src_autho_test.key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
+POSTHOOK: Lineage: src_autho_test.value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
 PREHOOK: query: create view v as select * from src_autho_test
 PREHOOK: type: CREATEVIEW
 PREHOOK: Input: default@src_autho_test

http://git-wip-us.apache.org/repos/asf/hive/blob/fdc9cafe/ql/src/test/results/clientpositive/authorization_view_disable_cbo_1.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/authorization_view_disable_cbo_1.q.out b/ql/src/test/results/clientpositive/authorization_view_disable_cbo_1.q.out
index 0341f0b..8fe92dd 100644
--- a/ql/src/test/results/clientpositive/authorization_view_disable_cbo_1.q.out
+++ b/ql/src/test/results/clientpositive/authorization_view_disable_cbo_1.q.out
@@ -8,6 +8,8 @@ POSTHOOK: type: CREATETABLE_AS_SELECT
 POSTHOOK: Input: default@src
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@src_autho_test
+POSTHOOK: Lineage: src_autho_test.key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
+POSTHOOK: Lineage: src_autho_test.value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
 PREHOOK: query: create view v as select * from src_autho_test
 PREHOOK: type: CREATEVIEW
 PREHOOK: Input: default@src_autho_test

http://git-wip-us.apache.org/repos/asf/hive/blob/fdc9cafe/ql/src/test/results/clientpositive/autogen_colalias.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/autogen_colalias.q.out b/ql/src/test/results/clientpositive/autogen_colalias.q.out
index 896a468..ec049a7 100644
--- a/ql/src/test/results/clientpositive/autogen_colalias.q.out
+++ b/ql/src/test/results/clientpositive/autogen_colalias.q.out
@@ -20,6 +20,16 @@ POSTHOOK: type: CREATETABLE_AS_SELECT
 POSTHOOK: Input: default@src
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@dest_grouped_old1
+POSTHOOK: Lineage: dest_grouped_old1.c0 SIMPLE []
+POSTHOOK: Lineage: dest_grouped_old1.c3 EXPRESSION [(src)src.FieldSchema(name:value, type:string, comment:default), ]
+POSTHOOK: Lineage: dest_grouped_old1.c4 EXPRESSION [(src)src.FieldSchema(name:value, type:string, comment:default), ]
+POSTHOOK: Lineage: dest_grouped_old1.c5 EXPRESSION [(src)src.FieldSchema(name:value, type:string, comment:default), ]
+POSTHOOK: Lineage: dest_grouped_old1.c6 EXPRESSION [(src)src.FieldSchema(name:value, type:string, comment:default), ]
+POSTHOOK: Lineage: dest_grouped_old1.c7 SIMPLE []
+POSTHOOK: Lineage: dest_grouped_old1.c8 EXPRESSION [(src)src.FieldSchema(name:value, type:string, comment:default), ]
+POSTHOOK: Lineage: dest_grouped_old1.c9 EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ]
+POSTHOOK: Lineage: dest_grouped_old1.key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
+POSTHOOK: Lineage: dest_grouped_old1.zz SIMPLE []
 PREHOOK: query: describe dest_grouped_old1
 PREHOOK: type: DESCTABLE
 PREHOOK: Input: default@dest_grouped_old1
@@ -46,6 +56,7 @@ POSTHOOK: type: CREATETABLE_AS_SELECT
 POSTHOOK: Input: default@src
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@dest_grouped_old2
+POSTHOOK: Lineage: dest_grouped_old2.key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
 PREHOOK: query: describe dest_grouped_old2
 PREHOOK: type: DESCTABLE
 PREHOOK: Input: default@dest_grouped_old2
@@ -69,6 +80,16 @@ POSTHOOK: type: CREATETABLE_AS_SELECT
 POSTHOOK: Input: default@src
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@dest_grouped_new1
+POSTHOOK: Lineage: dest_grouped_new1.column_0 SIMPLE []
+POSTHOOK: Lineage: dest_grouped_new1.column_2 EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ]
+POSTHOOK: Lineage: dest_grouped_new1.count_sin_src_value_6 EXPRESSION [(src)src.FieldSchema(name:value, type:string, comment:default), ]
+POSTHOOK: Lineage: dest_grouped_new1.count_src_value_4 EXPRESSION [(src)src.FieldSchema(name:value, type:string, comment:default), ]
+POSTHOOK: Lineage: dest_grouped_new1.current_timestamp_7 SIMPLE []
+POSTHOOK: Lineage: dest_grouped_new1.if_src_key_10_src_ke_9 EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ]
+POSTHOOK: Lineage: dest_grouped_new1.sin_count_src_value_5 EXPRESSION [(src)src.FieldSchema(name:value, type:string, comment:default), ]
+POSTHOOK: Lineage: dest_grouped_new1.sum_if_value_10_valu_8 EXPRESSION [(src)src.FieldSchema(name:value, type:string, comment:default), ]
+POSTHOOK: Lineage: dest_grouped_new1.test_max_length_src__3 EXPRESSION [(src)src.FieldSchema(name:value, type:string, comment:default), ]
+POSTHOOK: Lineage: dest_grouped_new1.zz SIMPLE []
 PREHOOK: query: describe dest_grouped_new1
 PREHOOK: type: DESCTABLE
 PREHOOK: Input: default@dest_grouped_new1
@@ -95,6 +116,7 @@ POSTHOOK: type: CREATETABLE_AS_SELECT
 POSTHOOK: Input: default@src
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@dest_grouped_new2
+POSTHOOK: Lineage: dest_grouped_new2.key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
 PREHOOK: query: describe dest_grouped_new2
 PREHOOK: type: DESCTABLE
 PREHOOK: Input: default@dest_grouped_new2

http://git-wip-us.apache.org/repos/asf/hive/blob/fdc9cafe/ql/src/test/results/clientpositive/cbo_SortUnionTransposeRule.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/cbo_SortUnionTransposeRule.q.out b/ql/src/test/results/clientpositive/cbo_SortUnionTransposeRule.q.out
index e7094e8..7542882 100644
--- a/ql/src/test/results/clientpositive/cbo_SortUnionTransposeRule.q.out
+++ b/ql/src/test/results/clientpositive/cbo_SortUnionTransposeRule.q.out
@@ -8,6 +8,8 @@ POSTHOOK: type: CREATETABLE_AS_SELECT
 POSTHOOK: Input: default@src
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@s
+POSTHOOK: Lineage: s.key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
+POSTHOOK: Lineage: s.value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
 PREHOOK: query: explain
 select key from s a
 union all

http://git-wip-us.apache.org/repos/asf/hive/blob/fdc9cafe/ql/src/test/results/clientpositive/cbo_rp_cross_product_check_2.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/cbo_rp_cross_product_check_2.q.out b/ql/src/test/results/clientpositive/cbo_rp_cross_product_check_2.q.out
index 6697b2e..89f1746 100644
--- a/ql/src/test/results/clientpositive/cbo_rp_cross_product_check_2.q.out
+++ b/ql/src/test/results/clientpositive/cbo_rp_cross_product_check_2.q.out
@@ -14,6 +14,8 @@ POSTHOOK: type: CREATETABLE_AS_SELECT
 POSTHOOK: Input: default@src
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@A
+POSTHOOK: Lineage: a.key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
+POSTHOOK: Lineage: a.value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
 PREHOOK: query: create table B as
 select * from src order by key
 limit 10
@@ -28,6 +30,8 @@ POSTHOOK: type: CREATETABLE_AS_SELECT
 POSTHOOK: Input: default@src
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@B
+POSTHOOK: Lineage: b.key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
+POSTHOOK: Lineage: b.value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
 Warning: Map Join MAPJOIN[8][bigTable=?] in task 'Stage-3:MAPRED' is a cross product
 PREHOOK: query: explain select * from A join B
 PREHOOK: type: QUERY

http://git-wip-us.apache.org/repos/asf/hive/blob/fdc9cafe/ql/src/test/results/clientpositive/cbo_rp_unionDistinct_2.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/cbo_rp_unionDistinct_2.q.out b/ql/src/test/results/clientpositive/cbo_rp_unionDistinct_2.q.out
index 6d59369..304d74f 100644
--- a/ql/src/test/results/clientpositive/cbo_rp_unionDistinct_2.q.out
+++ b/ql/src/test/results/clientpositive/cbo_rp_unionDistinct_2.q.out
@@ -12,6 +12,8 @@ POSTHOOK: type: CREATETABLE_AS_SELECT
 POSTHOOK: Input: default@src
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@u1
+POSTHOOK: Lineage: u1.key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
+POSTHOOK: Lineage: u1.value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
 PREHOOK: query: CREATE TABLE u2 as select key, value from src order by key limit 3
 PREHOOK: type: CREATETABLE_AS_SELECT
 PREHOOK: Input: default@src
@@ -22,6 +24,8 @@ POSTHOOK: type: CREATETABLE_AS_SELECT
 POSTHOOK: Input: default@src
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@u2
+POSTHOOK: Lineage: u2.key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
+POSTHOOK: Lineage: u2.value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
 PREHOOK: query: CREATE TABLE u3 as select key, value from src order by key desc limit 5
 PREHOOK: type: CREATETABLE_AS_SELECT
 PREHOOK: Input: default@src
@@ -32,6 +36,8 @@ POSTHOOK: type: CREATETABLE_AS_SELECT
 POSTHOOK: Input: default@src
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@u3
+POSTHOOK: Lineage: u3.key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
+POSTHOOK: Lineage: u3.value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
 PREHOOK: query: select * from u1
 PREHOOK: type: QUERY
 PREHOOK: Input: default@u1

http://git-wip-us.apache.org/repos/asf/hive/blob/fdc9cafe/ql/src/test/results/clientpositive/char_nested_types.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/char_nested_types.q.out b/ql/src/test/results/clientpositive/char_nested_types.q.out
index 07bf3c3..f989132 100644
--- a/ql/src/test/results/clientpositive/char_nested_types.q.out
+++ b/ql/src/test/results/clientpositive/char_nested_types.q.out
@@ -173,6 +173,7 @@ POSTHOOK: type: CREATETABLE_AS_SELECT
 POSTHOOK: Input: default@char_nested_struct
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@char_nested_cta
+POSTHOOK: Lineage: char_nested_cta.c1 SIMPLE [(char_nested_struct)char_nested_struct.FieldSchema(name:c1, type:struct<a:int,b:char(20),c:string>, comment:null), ]
 PREHOOK: query: describe char_nested_cta
 PREHOOK: type: DESCTABLE
 PREHOOK: Input: default@char_nested_cta
@@ -203,6 +204,7 @@ POSTHOOK: type: CREATETABLE_AS_SELECT
 POSTHOOK: Input: default@char_nested_struct
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@char_nested_view
+POSTHOOK: Lineage: char_nested_view.c1 SIMPLE [(char_nested_struct)char_nested_struct.FieldSchema(name:c1, type:struct<a:int,b:char(20),c:string>, comment:null), ]
 PREHOOK: query: describe char_nested_view
 PREHOOK: type: DESCTABLE
 PREHOOK: Input: default@char_nested_view

http://git-wip-us.apache.org/repos/asf/hive/blob/fdc9cafe/ql/src/test/results/clientpositive/colstats_all_nulls.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/colstats_all_nulls.q.out b/ql/src/test/results/clientpositive/colstats_all_nulls.q.out
index 99c8fac..d567ec8 100644
--- a/ql/src/test/results/clientpositive/colstats_all_nulls.q.out
+++ b/ql/src/test/results/clientpositive/colstats_all_nulls.q.out
@@ -24,6 +24,9 @@ POSTHOOK: type: CREATETABLE_AS_SELECT
 POSTHOOK: Input: default@src_null
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@all_nulls
+POSTHOOK: Lineage: all_nulls.a SIMPLE [(src_null)src_null.FieldSchema(name:a, type:bigint, comment:null), ]
+POSTHOOK: Lineage: all_nulls.b EXPRESSION [(src_null)src_null.FieldSchema(name:a, type:bigint, comment:null), ]
+POSTHOOK: Lineage: all_nulls.c EXPRESSION [(src_null)src_null.FieldSchema(name:a, type:bigint, comment:null), ]
 PREHOOK: query: analyze table all_nulls compute statistics for columns
 PREHOOK: type: QUERY
 PREHOOK: Input: default@all_nulls

http://git-wip-us.apache.org/repos/asf/hive/blob/fdc9cafe/ql/src/test/results/clientpositive/create_default_prop.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/create_default_prop.q.out b/ql/src/test/results/clientpositive/create_default_prop.q.out
index 4b267ae..6d002c9 100644
--- a/ql/src/test/results/clientpositive/create_default_prop.q.out
+++ b/ql/src/test/results/clientpositive/create_default_prop.q.out
@@ -42,6 +42,7 @@ POSTHOOK: type: CREATETABLE_AS_SELECT
 POSTHOOK: Input: default@table_p1
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@table_p3
+POSTHOOK: Lineage: table_p3.a SIMPLE [(table_p1)table_p1.FieldSchema(name:a, type:string, comment:null), ]
 PREHOOK: query: DESC EXTENDED table_p3
 PREHOOK: type: DESCTABLE
 PREHOOK: Input: default@table_p3

http://git-wip-us.apache.org/repos/asf/hive/blob/fdc9cafe/ql/src/test/results/clientpositive/cross_product_check_1.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/cross_product_check_1.q.out b/ql/src/test/results/clientpositive/cross_product_check_1.q.out
index f9a8a0f..4feb798 100644
--- a/ql/src/test/results/clientpositive/cross_product_check_1.q.out
+++ b/ql/src/test/results/clientpositive/cross_product_check_1.q.out
@@ -14,6 +14,8 @@ POSTHOOK: type: CREATETABLE_AS_SELECT
 POSTHOOK: Input: default@src
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@A
+POSTHOOK: Lineage: a.key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
+POSTHOOK: Lineage: a.value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
 PREHOOK: query: create table B as
 select * from src
 limit 10
@@ -28,6 +30,8 @@ POSTHOOK: type: CREATETABLE_AS_SELECT
 POSTHOOK: Input: default@src
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@B
+POSTHOOK: Lineage: b.key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
+POSTHOOK: Lineage: b.value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
 Warning: Shuffle Join JOIN[7][tables = [$hdt$_0, $hdt$_1]] in Stage 'Stage-1:MAPRED' is a cross product
 PREHOOK: query: explain select * from A join B
 PREHOOK: type: QUERY

http://git-wip-us.apache.org/repos/asf/hive/blob/fdc9cafe/ql/src/test/results/clientpositive/cross_product_check_2.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/cross_product_check_2.q.out b/ql/src/test/results/clientpositive/cross_product_check_2.q.out
index a8bac78..f34f2b5 100644
--- a/ql/src/test/results/clientpositive/cross_product_check_2.q.out
+++ b/ql/src/test/results/clientpositive/cross_product_check_2.q.out
@@ -14,6 +14,8 @@ POSTHOOK: type: CREATETABLE_AS_SELECT
 POSTHOOK: Input: default@src
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@A
+POSTHOOK: Lineage: a.key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
+POSTHOOK: Lineage: a.value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
 PREHOOK: query: create table B as
 select * from src order by key
 limit 10
@@ -28,6 +30,8 @@ POSTHOOK: type: CREATETABLE_AS_SELECT
 POSTHOOK: Input: default@src
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@B
+POSTHOOK: Lineage: b.key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
+POSTHOOK: Lineage: b.value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
 Warning: Map Join MAPJOIN[10][bigTable=?] in task 'Stage-3:MAPRED' is a cross product
 PREHOOK: query: explain select * from A join B
 PREHOOK: type: QUERY

http://git-wip-us.apache.org/repos/asf/hive/blob/fdc9cafe/ql/src/test/results/clientpositive/ctas.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/ctas.q.out b/ql/src/test/results/clientpositive/ctas.q.out
index 06003ee..c9676de 100644
--- a/ql/src/test/results/clientpositive/ctas.q.out
+++ b/ql/src/test/results/clientpositive/ctas.q.out
@@ -116,6 +116,8 @@ POSTHOOK: type: CREATETABLE_AS_SELECT
 POSTHOOK: Input: default@src
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@nzhang_CTAS1
+POSTHOOK: Lineage: nzhang_ctas1.k SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
+POSTHOOK: Lineage: nzhang_ctas1.value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
 PREHOOK: query: select * from nzhang_CTAS1
 PREHOOK: type: QUERY
 PREHOOK: Input: default@nzhang_ctas1
@@ -265,6 +267,8 @@ POSTHOOK: type: CREATETABLE_AS_SELECT
 POSTHOOK: Input: default@src
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@nzhang_ctas2
+POSTHOOK: Lineage: nzhang_ctas2.key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
+POSTHOOK: Lineage: nzhang_ctas2.value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
 PREHOOK: query: select * from nzhang_ctas2
 PREHOOK: type: QUERY
 PREHOOK: Input: default@nzhang_ctas2
@@ -414,6 +418,8 @@ POSTHOOK: type: CREATETABLE_AS_SELECT
 POSTHOOK: Input: default@src
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@nzhang_ctas3
+POSTHOOK: Lineage: nzhang_ctas3.conb EXPRESSION [(src)src.FieldSchema(name:value, type:string, comment:default), ]
+POSTHOOK: Lineage: nzhang_ctas3.half_key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ]
 PREHOOK: query: select * from nzhang_ctas3
 PREHOOK: type: QUERY
 PREHOOK: Input: default@nzhang_ctas3
@@ -628,6 +634,8 @@ POSTHOOK: type: CREATETABLE_AS_SELECT
 POSTHOOK: Input: default@src
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@nzhang_ctas4
+POSTHOOK: Lineage: nzhang_ctas4.key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
+POSTHOOK: Lineage: nzhang_ctas4.value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
 PREHOOK: query: select * from nzhang_ctas4
 PREHOOK: type: QUERY
 PREHOOK: Input: default@nzhang_ctas4
@@ -938,6 +946,8 @@ POSTHOOK: type: CREATETABLE_AS_SELECT
 POSTHOOK: Input: default@src
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@nzhang_ctas5
+POSTHOOK: Lineage: nzhang_ctas5.key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
+POSTHOOK: Lineage: nzhang_ctas5.value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
 PREHOOK: query: create table nzhang_ctas6 (key string, `to` string)
 PREHOOK: type: CREATETABLE
 PREHOOK: Output: database:default
@@ -966,3 +976,5 @@ POSTHOOK: type: CREATETABLE_AS_SELECT
 POSTHOOK: Input: default@nzhang_ctas6
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@nzhang_ctas7
+POSTHOOK: Lineage: nzhang_ctas7.key SIMPLE [(nzhang_ctas6)nzhang_ctas6.FieldSchema(name:key, type:string, comment:null), ]
+POSTHOOK: Lineage: nzhang_ctas7.to SIMPLE [(nzhang_ctas6)nzhang_ctas6.FieldSchema(name:to, type:string, comment:null), ]

http://git-wip-us.apache.org/repos/asf/hive/blob/fdc9cafe/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 e8d5c41..c5dbe56 100644
--- a/ql/src/test/results/clientpositive/ctas_char.q.out
+++ b/ql/src/test/results/clientpositive/ctas_char.q.out
@@ -42,6 +42,8 @@ POSTHOOK: type: CREATETABLE_AS_SELECT
 POSTHOOK: Input: default@ctas_char_1
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@ctas_char_2
+POSTHOOK: Lineage: ctas_char_2.key SIMPLE [(ctas_char_1)ctas_char_1.FieldSchema(name:key, type:char(10), comment:null), ]
+POSTHOOK: Lineage: ctas_char_2.value SIMPLE [(ctas_char_1)ctas_char_1.FieldSchema(name:value, type:string, comment:null), ]
 PREHOOK: query: -- view with char column
 create view ctas_char_3 as select key, value from ctas_char_2
 PREHOOK: type: CREATEVIEW

http://git-wip-us.apache.org/repos/asf/hive/blob/fdc9cafe/ql/src/test/results/clientpositive/ctas_colname.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/ctas_colname.q.out b/ql/src/test/results/clientpositive/ctas_colname.q.out
index 7c86c66..2622676 100644
--- a/ql/src/test/results/clientpositive/ctas_colname.q.out
+++ b/ql/src/test/results/clientpositive/ctas_colname.q.out
@@ -88,6 +88,10 @@ POSTHOOK: type: CREATETABLE_AS_SELECT
 POSTHOOK: Input: default@src
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@summary
+POSTHOOK: Lineage: summary.c1 EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ]
+POSTHOOK: Lineage: summary.c2 EXPRESSION [(src)src.FieldSchema(name:value, type:string, comment:default), ]
+POSTHOOK: Lineage: summary.key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
+POSTHOOK: Lineage: summary.value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
 PREHOOK: query: describe formatted summary
 PREHOOK: type: DESCTABLE
 PREHOOK: Input: default@summary
@@ -246,6 +250,9 @@ POSTHOOK: type: CREATETABLE_AS_SELECT
 POSTHOOK: Input: default@src1
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@x4
+POSTHOOK: Lineage: x4.key SIMPLE [(src1)src1.FieldSchema(name:key, type:string, comment:default), ]
+POSTHOOK: Lineage: x4.rr SCRIPT [(src1)src1.FieldSchema(name:key, type:string, comment:default), (src1)src1.FieldSchema(name:value, type:string, comment:default), ]
+POSTHOOK: Lineage: x4.value SIMPLE [(src1)src1.FieldSchema(name:value, type:string, comment:default), ]
 PREHOOK: query: describe formatted x4
 PREHOOK: type: DESCTABLE
 PREHOOK: Input: default@x4
@@ -434,6 +441,9 @@ POSTHOOK: type: CREATETABLE_AS_SELECT
 POSTHOOK: Input: default@src
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@x5
+POSTHOOK: Lineage: x5.key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
+POSTHOOK: Lineage: x5.lead1 SCRIPT [(src)src.FieldSchema(name:key, type:string, comment:default), (src)src.FieldSchema(name:value, type:string, comment:default), ]
+POSTHOOK: Lineage: x5.value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
 PREHOOK: query: describe formatted x5
 PREHOOK: type: DESCTABLE
 PREHOOK: Input: default@x5
@@ -604,6 +614,9 @@ POSTHOOK: type: CREATETABLE_AS_SELECT
 POSTHOOK: Input: default@src1
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@x6
+POSTHOOK: Lineage: x6._c1 EXPRESSION [(src1)src1.FieldSchema(name:key, type:string, comment:default), ]
+POSTHOOK: Lineage: x6.key SIMPLE [(src1)src1.FieldSchema(name:key, type:string, comment:default), ]
+POSTHOOK: Lineage: x6.value SIMPLE [(src1)src1.FieldSchema(name:value, type:string, comment:default), ]
 PREHOOK: query: describe formatted x6
 PREHOOK: type: DESCTABLE
 PREHOOK: Input: default@x6
@@ -752,6 +765,9 @@ POSTHOOK: type: CREATETABLE_AS_SELECT
 POSTHOOK: Input: default@src
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@x7
+POSTHOOK: Lineage: x7._c1 EXPRESSION [(src)src.FieldSchema(name:value, type:string, comment:default), ]
+POSTHOOK: Lineage: x7._col0 SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
+POSTHOOK: Lineage: x7._col1 SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
 PREHOOK: query: describe formatted x7
 PREHOOK: type: DESCTABLE
 PREHOOK: Input: default@x7
@@ -1183,6 +1199,9 @@ POSTHOOK: type: CREATETABLE_AS_SELECT
 POSTHOOK: Input: default@src
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@x8
+POSTHOOK: Lineage: x8._c1 EXPRESSION [(src)src.FieldSchema(name:value, type:string, comment:default), ]
+POSTHOOK: Lineage: x8._col0 SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
+POSTHOOK: Lineage: x8._col1 SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
 PREHOOK: query: describe formatted x8
 PREHOOK: type: DESCTABLE
 PREHOOK: Input: default@x8
@@ -1317,6 +1336,8 @@ POSTHOOK: type: CREATETABLE_AS_SELECT
 POSTHOOK: Input: default@src
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@x9
+POSTHOOK: Lineage: x9._c0 EXPRESSION [(src)src.FieldSchema(name:value, type:string, comment:default), ]
+POSTHOOK: Lineage: x9.key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
 PREHOOK: query: describe formatted x9
 PREHOOK: type: DESCTABLE
 PREHOOK: Input: default@x9

http://git-wip-us.apache.org/repos/asf/hive/blob/fdc9cafe/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 884e649..a441f8d 100644
--- a/ql/src/test/results/clientpositive/ctas_date.q.out
+++ b/ql/src/test/results/clientpositive/ctas_date.q.out
@@ -47,6 +47,10 @@ POSTHOOK: type: CREATETABLE_AS_SELECT
 POSTHOOK: Input: default@ctas_date_1
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@ctas_date_2
+POSTHOOK: Lineage: ctas_date_2.c3 SIMPLE []
+POSTHOOK: Lineage: ctas_date_2.dd SIMPLE [(ctas_date_1)ctas_date_1.FieldSchema(name:dd, type:date, comment:null), ]
+POSTHOOK: Lineage: ctas_date_2.key SIMPLE [(ctas_date_1)ctas_date_1.FieldSchema(name:key, type:int, comment:null), ]
+POSTHOOK: Lineage: ctas_date_2.value SIMPLE [(ctas_date_1)ctas_date_1.FieldSchema(name:value, type:string, comment:null), ]
 PREHOOK: query: -- view with date column
 create view ctas_date_3 as select * from ctas_date_2 where dd > date '2000-01-01'
 PREHOOK: type: CREATEVIEW

http://git-wip-us.apache.org/repos/asf/hive/blob/fdc9cafe/ql/src/test/results/clientpositive/ctas_uses_database_location.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/ctas_uses_database_location.q.out b/ql/src/test/results/clientpositive/ctas_uses_database_location.q.out
index 35f99e6..39d8bcf 100644
--- a/ql/src/test/results/clientpositive/ctas_uses_database_location.q.out
+++ b/ql/src/test/results/clientpositive/ctas_uses_database_location.q.out
@@ -124,6 +124,8 @@ POSTHOOK: type: CREATETABLE_AS_SELECT
 POSTHOOK: Input: default@src
 POSTHOOK: Output: database:db1
 POSTHOOK: Output: db1@table_db1
+POSTHOOK: Lineage: table_db1.key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
+POSTHOOK: Lineage: table_db1.value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
 PREHOOK: query: DESCRIBE FORMATTED table_db1
 PREHOOK: type: DESCTABLE
 PREHOOK: Input: db1@table_db1

http://git-wip-us.apache.org/repos/asf/hive/blob/fdc9cafe/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 9ceb64a..9715e09 100644
--- a/ql/src/test/results/clientpositive/ctas_varchar.q.out
+++ b/ql/src/test/results/clientpositive/ctas_varchar.q.out
@@ -42,6 +42,8 @@ POSTHOOK: type: CREATETABLE_AS_SELECT
 POSTHOOK: Input: default@ctas_varchar_1
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@ctas_varchar_2
+POSTHOOK: Lineage: ctas_varchar_2.key SIMPLE [(ctas_varchar_1)ctas_varchar_1.FieldSchema(name:key, type:varchar(10), comment:null), ]
+POSTHOOK: Lineage: ctas_varchar_2.value SIMPLE [(ctas_varchar_1)ctas_varchar_1.FieldSchema(name:value, type:string, comment:null), ]
 PREHOOK: query: -- view with varchar column
 create view ctas_varchar_3 as select key, value from ctas_varchar_2
 PREHOOK: type: CREATEVIEW

http://git-wip-us.apache.org/repos/asf/hive/blob/fdc9cafe/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 d6923ba..4b0bc71 100644
--- a/ql/src/test/results/clientpositive/cte_2.q.out
+++ b/ql/src/test/results/clientpositive/cte_2.q.out
@@ -94,6 +94,7 @@ POSTHOOK: type: CREATETABLE_AS_SELECT
 POSTHOOK: Input: default@src
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@s2
+POSTHOOK: Lineage: s2.key SIMPLE []
 PREHOOK: query: select * from s2
 PREHOOK: type: QUERY
 PREHOOK: Input: default@s2

http://git-wip-us.apache.org/repos/asf/hive/blob/fdc9cafe/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 d560d74..6385abe 100644
--- a/ql/src/test/results/clientpositive/cte_4.q.out
+++ b/ql/src/test/results/clientpositive/cte_4.q.out
@@ -124,6 +124,7 @@ POSTHOOK: Output: database:default
 POSTHOOK: Output: default@q1
 POSTHOOK: Output: default@s2
 #### A masked pattern was here ####
+POSTHOOK: Lineage: s2.key SIMPLE [(q1)q1.FieldSchema(name:key, type:string, comment:null), ]
 PREHOOK: query: select * from s2
 PREHOOK: type: QUERY
 PREHOOK: Input: default@s2

http://git-wip-us.apache.org/repos/asf/hive/blob/fdc9cafe/ql/src/test/results/clientpositive/database.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/database.q.out b/ql/src/test/results/clientpositive/database.q.out
index 02eb3d3..8c2653c 100644
--- a/ql/src/test/results/clientpositive/database.q.out
+++ b/ql/src/test/results/clientpositive/database.q.out
@@ -1324,6 +1324,7 @@ POSTHOOK: type: CREATETABLE_AS_SELECT
 POSTHOOK: Input: default@src
 POSTHOOK: Output: database:db2
 POSTHOOK: Output: db2@conflict_name
+POSTHOOK: Lineage: conflict_name.value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
 PREHOOK: query: -- CREATE foreign table
 CREATE TABLE db1.conflict_name AS
 SELECT value FROM db1.src WHERE key = 8
@@ -1338,6 +1339,7 @@ POSTHOOK: type: CREATETABLE_AS_SELECT
 POSTHOOK: Input: db1@src
 POSTHOOK: Output: database:db1
 POSTHOOK: Output: db1@conflict_name
+POSTHOOK: Lineage: conflict_name.value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:null), ]
 PREHOOK: query: -- query tables with the same names in different DBs
 SELECT * FROM (
   SELECT value FROM db1.conflict_name

http://git-wip-us.apache.org/repos/asf/hive/blob/fdc9cafe/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 dadd9f1..f9adbc9 100644
--- a/ql/src/test/results/clientpositive/dbtxnmgr_ddl1.q.out
+++ b/ql/src/test/results/clientpositive/dbtxnmgr_ddl1.q.out
@@ -66,6 +66,8 @@ POSTHOOK: type: CREATETABLE_AS_SELECT
 POSTHOOK: Input: default@t1
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@T3
+POSTHOOK: Lineage: t3.key SIMPLE [(t1)t1.FieldSchema(name:key, type:string, comment:null), ]
+POSTHOOK: Lineage: t3.val SIMPLE [(t1)t1.FieldSchema(name:val, type:string, comment:null), ]
 PREHOOK: query: create table T4 (key char(10), val decimal(5,2), b int)
     partitioned by (ds string)
     clustered by (b) into 10 buckets

http://git-wip-us.apache.org/repos/asf/hive/blob/fdc9cafe/ql/src/test/results/clientpositive/decimal_6.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/decimal_6.q.out b/ql/src/test/results/clientpositive/decimal_6.q.out
index e1ce600..2c2c97a 100644
--- a/ql/src/test/results/clientpositive/decimal_6.q.out
+++ b/ql/src/test/results/clientpositive/decimal_6.q.out
@@ -136,6 +136,8 @@ POSTHOOK: type: CREATETABLE_AS_SELECT
 POSTHOOK: Input: default@decimal_6_1
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@DECIMAL_6_3
+POSTHOOK: Lineage: decimal_6_3.k EXPRESSION [(decimal_6_1)decimal_6_1.FieldSchema(name:key, type:decimal(10,5), comment:null), ]
+POSTHOOK: Lineage: decimal_6_3.v EXPRESSION [(decimal_6_1)decimal_6_1.FieldSchema(name:value, type:int, comment:null), ]
 PREHOOK: query: desc DECIMAL_6_3
 PREHOOK: type: DESCTABLE
 PREHOOK: Input: default@decimal_6_3

http://git-wip-us.apache.org/repos/asf/hive/blob/fdc9cafe/ql/src/test/results/clientpositive/decimal_join2.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/decimal_join2.q.out b/ql/src/test/results/clientpositive/decimal_join2.q.out
index 47e7ceb..3a0b327 100644
--- a/ql/src/test/results/clientpositive/decimal_join2.q.out
+++ b/ql/src/test/results/clientpositive/decimal_join2.q.out
@@ -38,6 +38,8 @@ POSTHOOK: type: CREATETABLE_AS_SELECT
 POSTHOOK: Input: default@decimal_3_txt
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@DECIMAL_3
+POSTHOOK: Lineage: decimal_3.key SIMPLE [(decimal_3_txt)decimal_3_txt.FieldSchema(name:key, type:decimal(38,18), comment:null), ]
+POSTHOOK: Lineage: decimal_3.value SIMPLE [(decimal_3_txt)decimal_3_txt.FieldSchema(name:value, type:int, comment:null), ]
 PREHOOK: query: EXPLAIN
 SELECT * FROM DECIMAL_3 a JOIN DECIMAL_3 b ON (a.key = b.key) ORDER BY a.key, a.value, b.key, b.value
 PREHOOK: type: QUERY

http://git-wip-us.apache.org/repos/asf/hive/blob/fdc9cafe/ql/src/test/results/clientpositive/decimal_serde.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/decimal_serde.q.out b/ql/src/test/results/clientpositive/decimal_serde.q.out
index 520f85f..e0f5c74 100644
--- a/ql/src/test/results/clientpositive/decimal_serde.q.out
+++ b/ql/src/test/results/clientpositive/decimal_serde.q.out
@@ -96,6 +96,8 @@ POSTHOOK: type: CREATETABLE_AS_SELECT
 POSTHOOK: Input: default@decimal_text
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@DECIMAL_RC
+POSTHOOK: Lineage: decimal_rc.key SIMPLE [(decimal_text)decimal_text.FieldSchema(name:key, type:decimal(10,0), comment:null), ]
+POSTHOOK: Lineage: decimal_rc.value SIMPLE [(decimal_text)decimal_text.FieldSchema(name:value, type:int, comment:null), ]
 PREHOOK: query: describe formatted DECIMAL_RC
 PREHOOK: type: DESCTABLE
 PREHOOK: Input: default@decimal_rc
@@ -147,6 +149,8 @@ POSTHOOK: type: CREATETABLE_AS_SELECT
 POSTHOOK: Input: default@decimal_rc
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@DECIMAL_LAZY_COL
+POSTHOOK: Lineage: decimal_lazy_col.key SIMPLE [(decimal_rc)decimal_rc.FieldSchema(name:key, type:decimal(10,0), comment:null), ]
+POSTHOOK: Lineage: decimal_lazy_col.value SIMPLE [(decimal_rc)decimal_rc.FieldSchema(name:value, type:int, comment:null), ]
 PREHOOK: query: describe formatted DECIMAL_LAZY_COL
 PREHOOK: type: DESCTABLE
 PREHOOK: Input: default@decimal_lazy_col
@@ -204,6 +208,8 @@ POSTHOOK: type: CREATETABLE_AS_SELECT
 POSTHOOK: Input: default@decimal_lazy_col
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@DECIMAL_SEQUENCE
+POSTHOOK: Lineage: decimal_sequence.key SIMPLE [(decimal_lazy_col)decimal_lazy_col.FieldSchema(name:key, type:decimal(10,0), comment:null), ]
+POSTHOOK: Lineage: decimal_sequence.value SIMPLE [(decimal_lazy_col)decimal_lazy_col.FieldSchema(name:value, type:int, comment:null), ]
 PREHOOK: query: SELECT * FROM DECIMAL_SEQUENCE ORDER BY key, value
 PREHOOK: type: QUERY
 PREHOOK: Input: default@decimal_sequence

http://git-wip-us.apache.org/repos/asf/hive/blob/fdc9cafe/ql/src/test/results/clientpositive/empty_join.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/empty_join.q.out b/ql/src/test/results/clientpositive/empty_join.q.out
index a1aad9f..9a47c1f 100644
--- a/ql/src/test/results/clientpositive/empty_join.q.out
+++ b/ql/src/test/results/clientpositive/empty_join.q.out
@@ -12,6 +12,7 @@ POSTHOOK: type: CREATETABLE_AS_SELECT
 POSTHOOK: Input: _dummy_database@_dummy_table
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@test_1
+POSTHOOK: Lineage: test_1.id SIMPLE []
 PREHOOK: query: DROP TABLE IF EXISTS test_2
 PREHOOK: type: DROPTABLE
 POSTHOOK: query: DROP TABLE IF EXISTS test_2
@@ -38,6 +39,7 @@ POSTHOOK: type: CREATETABLE_AS_SELECT
 POSTHOOK: Input: _dummy_database@_dummy_table
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@test_3
+POSTHOOK: Lineage: test_3.id SIMPLE []
 PREHOOK: query: explain
 SELECT t1.id, t2.id, t3.id
 FROM test_1 t1

http://git-wip-us.apache.org/repos/asf/hive/blob/fdc9cafe/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 3371e7e..fa73d99 100644
--- a/ql/src/test/results/clientpositive/explain_ddl.q.out
+++ b/ql/src/test/results/clientpositive/explain_ddl.q.out
@@ -35,6 +35,8 @@ POSTHOOK: type: CREATETABLE_AS_SELECT
 POSTHOOK: Input: default@src
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@M1
+POSTHOOK: Lineage: m1.key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
+POSTHOOK: Lineage: m1.value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
 PREHOOK: query: select count(*) from M1 where key > 0
 PREHOOK: type: QUERY
 PREHOOK: Input: default@m1

http://git-wip-us.apache.org/repos/asf/hive/blob/fdc9cafe/ql/src/test/results/clientpositive/global_limit.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/global_limit.q.out b/ql/src/test/results/clientpositive/global_limit.q.out
index 7da20d5..0c76f3f 100644
--- a/ql/src/test/results/clientpositive/global_limit.q.out
+++ b/ql/src/test/results/clientpositive/global_limit.q.out
@@ -58,6 +58,7 @@ POSTHOOK: type: CREATETABLE_AS_SELECT
 POSTHOOK: Input: default@gl_src1
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@gl_tgt
+POSTHOOK: Lineage: gl_tgt.key SIMPLE [(gl_src1)gl_src1.FieldSchema(name:key, type:int, comment:null), ]
 PREHOOK: query: select * from gl_tgt ORDER BY key ASC
 PREHOOK: type: QUERY
 PREHOOK: Input: default@gl_tgt

http://git-wip-us.apache.org/repos/asf/hive/blob/fdc9cafe/ql/src/test/results/clientpositive/groupby_duplicate_key.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/groupby_duplicate_key.q.out b/ql/src/test/results/clientpositive/groupby_duplicate_key.q.out
index 49ab3ae..dd2ea75 100644
--- a/ql/src/test/results/clientpositive/groupby_duplicate_key.q.out
+++ b/ql/src/test/results/clientpositive/groupby_duplicate_key.q.out
@@ -157,6 +157,9 @@ POSTHOOK: type: CREATETABLE_AS_SELECT
 POSTHOOK: Input: default@src
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@dummy
+POSTHOOK: Lineage: dummy.dummy1 SIMPLE []
+POSTHOOK: Lineage: dummy.dummy2 SIMPLE []
+POSTHOOK: Lineage: dummy.key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
 PREHOOK: query: select key,dummy1,dummy2 from dummy
 PREHOOK: type: QUERY
 PREHOOK: Input: default@dummy

http://git-wip-us.apache.org/repos/asf/hive/blob/fdc9cafe/ql/src/test/results/clientpositive/input46.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/input46.q.out b/ql/src/test/results/clientpositive/input46.q.out
index 4240566..e07d63c 100644
--- a/ql/src/test/results/clientpositive/input46.q.out
+++ b/ql/src/test/results/clientpositive/input46.q.out
@@ -14,6 +14,8 @@ POSTHOOK: type: CREATETABLE_AS_SELECT
 POSTHOOK: Input: default@src
 POSTHOOK: Output: database:table_in_database_creation
 POSTHOOK: Output: table_in_database_creation@test1
+POSTHOOK: Lineage: test1.key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
+POSTHOOK: Lineage: test1.value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
 PREHOOK: query: create table `table_in_database_creation`.`test2` as select * from src limit 1
 PREHOOK: type: CREATETABLE_AS_SELECT
 PREHOOK: Input: default@src
@@ -24,6 +26,8 @@ POSTHOOK: type: CREATETABLE_AS_SELECT
 POSTHOOK: Input: default@src
 POSTHOOK: Output: database:table_in_database_creation
 POSTHOOK: Output: table_in_database_creation@test2
+POSTHOOK: Lineage: test2.key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
+POSTHOOK: Lineage: test2.value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
 PREHOOK: query: create table table_in_database_creation.test3 (a string)
 PREHOOK: type: CREATETABLE
 PREHOOK: Output: database:table_in_database_creation

http://git-wip-us.apache.org/repos/asf/hive/blob/fdc9cafe/ql/src/test/results/clientpositive/insert0.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/insert0.q.out b/ql/src/test/results/clientpositive/insert0.q.out
index e83bae1..e8a4884 100644
--- a/ql/src/test/results/clientpositive/insert0.q.out
+++ b/ql/src/test/results/clientpositive/insert0.q.out
@@ -94,6 +94,8 @@ POSTHOOK: type: CREATETABLE_AS_SELECT
 POSTHOOK: Input: default@src
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@ctas_table
+POSTHOOK: Lineage: ctas_table.foo EXPRESSION [(src)src.FieldSchema(name:value, type:string, comment:default), ]
+POSTHOOK: Lineage: ctas_table.key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
 PREHOOK: query: describe extended ctas_table
 PREHOOK: type: DESCTABLE
 PREHOOK: Input: default@ctas_table

http://git-wip-us.apache.org/repos/asf/hive/blob/fdc9cafe/ql/src/test/results/clientpositive/join41.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/join41.q.out b/ql/src/test/results/clientpositive/join41.q.out
index b33652d..2ad59f5 100644
--- a/ql/src/test/results/clientpositive/join41.q.out
+++ b/ql/src/test/results/clientpositive/join41.q.out
@@ -8,6 +8,8 @@ POSTHOOK: type: CREATETABLE_AS_SELECT
 POSTHOOK: Input: default@src
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@s1
+POSTHOOK: Lineage: s1.key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
+POSTHOOK: Lineage: s1.value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
 PREHOOK: query: EXPLAIN
 SELECT * FROM s1 src1 LEFT OUTER JOIN s1 src2 ON (src1.key = src2.key AND src2.key > 10)
 PREHOOK: type: QUERY

http://git-wip-us.apache.org/repos/asf/hive/blob/fdc9cafe/ql/src/test/results/clientpositive/join42.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/join42.q.out b/ql/src/test/results/clientpositive/join42.q.out
index e52f1fc..542408f 100644
--- a/ql/src/test/results/clientpositive/join42.q.out
+++ b/ql/src/test/results/clientpositive/join42.q.out
@@ -8,6 +8,7 @@ POSTHOOK: type: CREATETABLE_AS_SELECT
 POSTHOOK: Input: _dummy_database@_dummy_table
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@L
+POSTHOOK: Lineage: l.id SIMPLE []
 PREHOOK: query: create table LA as select 4436 loan_id, 4748 aid, 4415 pi_id
 PREHOOK: type: CREATETABLE_AS_SELECT
 PREHOOK: Input: _dummy_database@_dummy_table
@@ -18,6 +19,9 @@ POSTHOOK: type: CREATETABLE_AS_SELECT
 POSTHOOK: Input: _dummy_database@_dummy_table
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@LA
+POSTHOOK: Lineage: la.aid SIMPLE []
+POSTHOOK: Lineage: la.loan_id SIMPLE []
+POSTHOOK: Lineage: la.pi_id SIMPLE []
 PREHOOK: query: create table FR as select 4436 loan_id
 PREHOOK: type: CREATETABLE_AS_SELECT
 PREHOOK: Input: _dummy_database@_dummy_table
@@ -28,6 +32,7 @@ POSTHOOK: type: CREATETABLE_AS_SELECT
 POSTHOOK: Input: _dummy_database@_dummy_table
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@FR
+POSTHOOK: Lineage: fr.loan_id SIMPLE []
 PREHOOK: query: create table A as select 4748 id
 PREHOOK: type: CREATETABLE_AS_SELECT
 PREHOOK: Input: _dummy_database@_dummy_table
@@ -38,6 +43,7 @@ POSTHOOK: type: CREATETABLE_AS_SELECT
 POSTHOOK: Input: _dummy_database@_dummy_table
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@A
+POSTHOOK: Lineage: a.id SIMPLE []
 PREHOOK: query: create table PI as select 4415 id
 PREHOOK: type: CREATETABLE_AS_SELECT
 PREHOOK: Input: _dummy_database@_dummy_table
@@ -48,6 +54,7 @@ POSTHOOK: type: CREATETABLE_AS_SELECT
 POSTHOOK: Input: _dummy_database@_dummy_table
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@PI
+POSTHOOK: Lineage: pi.id SIMPLE []
 PREHOOK: query: create table acct as select 4748 aid, 10 acc_n, 122 brn
 PREHOOK: type: CREATETABLE_AS_SELECT
 PREHOOK: Input: _dummy_database@_dummy_table
@@ -58,6 +65,9 @@ POSTHOOK: type: CREATETABLE_AS_SELECT
 POSTHOOK: Input: _dummy_database@_dummy_table
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@acct
+POSTHOOK: Lineage: acct.acc_n SIMPLE []
+POSTHOOK: Lineage: acct.aid SIMPLE []
+POSTHOOK: Lineage: acct.brn SIMPLE []
 PREHOOK: query: insert into table acct values(4748, null, null)
 PREHOOK: type: QUERY
 PREHOOK: Input: default@values__tmp__table__1

http://git-wip-us.apache.org/repos/asf/hive/blob/fdc9cafe/ql/src/test/results/clientpositive/join_filters_overlap.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/join_filters_overlap.q.out b/ql/src/test/results/clientpositive/join_filters_overlap.q.out
index ca1e085..dede6b7 100644
--- a/ql/src/test/results/clientpositive/join_filters_overlap.q.out
+++ b/ql/src/test/results/clientpositive/join_filters_overlap.q.out
@@ -14,6 +14,8 @@ POSTHOOK: type: CREATETABLE_AS_SELECT
 POSTHOOK: Input: default@src
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@a
+POSTHOOK: Lineage: a.key SIMPLE []
+POSTHOOK: Lineage: a.value SCRIPT []
 PREHOOK: query: -- overlap on a
 explain extended select * from a left outer join a b on (a.key=b.key AND a.value=50 AND b.value=50) left outer join a c on (a.key=c.key AND a.value=60 AND c.value=60)
 PREHOOK: type: QUERY

http://git-wip-us.apache.org/repos/asf/hive/blob/fdc9cafe/ql/src/test/results/clientpositive/lateral_view_outer.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/lateral_view_outer.q.out b/ql/src/test/results/clientpositive/lateral_view_outer.q.out
index bfb1650..994945a 100644
--- a/ql/src/test/results/clientpositive/lateral_view_outer.q.out
+++ b/ql/src/test/results/clientpositive/lateral_view_outer.q.out
@@ -192,6 +192,8 @@ POSTHOOK: type: CREATETABLE_AS_SELECT
 POSTHOOK: Input: default@src
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@array_valued
+POSTHOOK: Lineage: array_valued.key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
+POSTHOOK: Lineage: array_valued.value EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), (src)src.FieldSchema(name:value, type:string, comment:default), ]
 PREHOOK: query: explain
 select * from array_valued LATERAL VIEW OUTER explode(value) C AS a limit 10
 PREHOOK: type: QUERY

http://git-wip-us.apache.org/repos/asf/hive/blob/fdc9cafe/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 23f8ec6..017bded 100644
--- a/ql/src/test/results/clientpositive/llap/cte_2.q.out
+++ b/ql/src/test/results/clientpositive/llap/cte_2.q.out
@@ -94,6 +94,7 @@ POSTHOOK: type: CREATETABLE_AS_SELECT
 POSTHOOK: Input: default@src
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@s2
+POSTHOOK: Lineage: s2.key SIMPLE []
 PREHOOK: query: select * from s2
 PREHOOK: type: QUERY
 PREHOOK: Input: default@s2


Mime
View raw message