hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From the...@apache.org
Subject svn commit: r1564472 [1/2] - in /hive/trunk/ql/src: java/org/apache/hadoop/hive/ql/optimizer/ java/org/apache/hadoop/hive/ql/parse/ java/org/apache/hadoop/hive/ql/plan/ test/results/clientnegative/ test/results/clientpositive/
Date Tue, 04 Feb 2014 20:34:40 GMT
Author: thejas
Date: Tue Feb  4 20:34:39 2014
New Revision: 1564472

URL: http://svn.apache.org/r1564472
Log:
HIVE-5859 : Create view does not captures inputs (Navis via Thejas Nair)

Modified:
    hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/optimizer/GenMapRedUtils.java
    hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/optimizer/SimpleFetchOptimizer.java
    hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java
    hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/plan/HiveOperation.java
    hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/plan/PlanUtils.java
    hive/trunk/ql/src/test/results/clientnegative/alter_view_as_select_with_partition.q.out
    hive/trunk/ql/src/test/results/clientnegative/alter_view_failure.q.out
    hive/trunk/ql/src/test/results/clientnegative/alter_view_failure2.q.out
    hive/trunk/ql/src/test/results/clientnegative/alter_view_failure4.q.out
    hive/trunk/ql/src/test/results/clientnegative/alter_view_failure5.q.out
    hive/trunk/ql/src/test/results/clientnegative/alter_view_failure6.q.out
    hive/trunk/ql/src/test/results/clientnegative/alter_view_failure7.q.out
    hive/trunk/ql/src/test/results/clientnegative/alter_view_failure9.q.out
    hive/trunk/ql/src/test/results/clientnegative/analyze_view.q.out
    hive/trunk/ql/src/test/results/clientnegative/create_or_replace_view1.q.out
    hive/trunk/ql/src/test/results/clientnegative/create_or_replace_view2.q.out
    hive/trunk/ql/src/test/results/clientnegative/create_or_replace_view4.q.out
    hive/trunk/ql/src/test/results/clientnegative/create_or_replace_view5.q.out
    hive/trunk/ql/src/test/results/clientnegative/create_or_replace_view6.q.out
    hive/trunk/ql/src/test/results/clientnegative/create_or_replace_view7.q.out
    hive/trunk/ql/src/test/results/clientnegative/create_or_replace_view8.q.out
    hive/trunk/ql/src/test/results/clientnegative/create_view_failure1.q.out
    hive/trunk/ql/src/test/results/clientnegative/create_view_failure2.q.out
    hive/trunk/ql/src/test/results/clientnegative/create_view_failure4.q.out
    hive/trunk/ql/src/test/results/clientnegative/drop_table_failure2.q.out
    hive/trunk/ql/src/test/results/clientnegative/insert_view_failure.q.out
    hive/trunk/ql/src/test/results/clientnegative/invalidate_view1.q.out
    hive/trunk/ql/src/test/results/clientnegative/load_view_failure.q.out
    hive/trunk/ql/src/test/results/clientnegative/recursive_view.q.out
    hive/trunk/ql/src/test/results/clientnegative/unset_view_property.q.out
    hive/trunk/ql/src/test/results/clientpositive/alter_view_as_select.q.out
    hive/trunk/ql/src/test/results/clientpositive/alter_view_rename.q.out
    hive/trunk/ql/src/test/results/clientpositive/authorization_8.q.out
    hive/trunk/ql/src/test/results/clientpositive/authorization_view.q.out
    hive/trunk/ql/src/test/results/clientpositive/create_big_view.q.out
    hive/trunk/ql/src/test/results/clientpositive/create_like_tbl_props.q.out
    hive/trunk/ql/src/test/results/clientpositive/create_like_view.q.out
    hive/trunk/ql/src/test/results/clientpositive/create_or_replace_view.q.out
    hive/trunk/ql/src/test/results/clientpositive/create_view.q.out
    hive/trunk/ql/src/test/results/clientpositive/create_view_partitioned.q.out
    hive/trunk/ql/src/test/results/clientpositive/create_view_translate.q.out
    hive/trunk/ql/src/test/results/clientpositive/ctas_char.q.out
    hive/trunk/ql/src/test/results/clientpositive/ctas_date.q.out
    hive/trunk/ql/src/test/results/clientpositive/ctas_varchar.q.out
    hive/trunk/ql/src/test/results/clientpositive/database_drop.q.out
    hive/trunk/ql/src/test/results/clientpositive/describe_formatted_view_partitioned.q.out
    hive/trunk/ql/src/test/results/clientpositive/describe_formatted_view_partitioned_json.q.out
    hive/trunk/ql/src/test/results/clientpositive/explain_dependency.q.out
    hive/trunk/ql/src/test/results/clientpositive/explain_logical.q.out
    hive/trunk/ql/src/test/results/clientpositive/join_view.q.out
    hive/trunk/ql/src/test/results/clientpositive/lateral_view_noalias.q.out
    hive/trunk/ql/src/test/results/clientpositive/ppd_union_view.q.out
    hive/trunk/ql/src/test/results/clientpositive/ptf.q.out
    hive/trunk/ql/src/test/results/clientpositive/quotedid_basic.q.out
    hive/trunk/ql/src/test/results/clientpositive/show_create_table_view.q.out
    hive/trunk/ql/src/test/results/clientpositive/subquery_exists.q.out
    hive/trunk/ql/src/test/results/clientpositive/subquery_exists_having.q.out
    hive/trunk/ql/src/test/results/clientpositive/subquery_notin.q.out
    hive/trunk/ql/src/test/results/clientpositive/subquery_views.q.out
    hive/trunk/ql/src/test/results/clientpositive/union_top_level.q.out
    hive/trunk/ql/src/test/results/clientpositive/unset_table_view_property.q.out
    hive/trunk/ql/src/test/results/clientpositive/view.q.out
    hive/trunk/ql/src/test/results/clientpositive/view_cast.q.out
    hive/trunk/ql/src/test/results/clientpositive/view_inputs.q.out
    hive/trunk/ql/src/test/results/clientpositive/windowing.q.out

Modified: hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/optimizer/GenMapRedUtils.java
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/optimizer/GenMapRedUtils.java?rev=1564472&r1=1564471&r2=1564472&view=diff
==============================================================================
--- hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/optimizer/GenMapRedUtils.java (original)
+++ hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/optimizer/GenMapRedUtils.java Tue Feb  4 20:34:39 2014
@@ -421,28 +421,6 @@ public final class GenMapRedUtils {
     setTaskPlan(alias_id, topOp, task, local, opProcCtx, null);
   }
 
-  private static ReadEntity getParentViewInfo(String alias_id,
-      Map<String, ReadEntity> viewAliasToInput) {
-    String[] aliases = alias_id.split(":");
-
-    String currentAlias = null;
-    ReadEntity currentInput = null;
-    // Find the immediate parent possible.
-    // For eg: for a query like 'select * from V3', where V3 -> V2, V2 -> V1, V1 -> T
-    // -> implies depends on.
-    // T's parent would be V1
-    for (int pos = 0; pos < aliases.length; pos++) {
-      currentAlias = currentAlias == null ? aliases[pos] : currentAlias + ":" + aliases[pos];
-      ReadEntity input = viewAliasToInput.get(currentAlias);
-      if (input == null) {
-        return currentInput;
-      }
-      currentInput = input;
-    }
-
-    return currentInput;
-  }
-
   /**
    * set the current task in the mapredWork.
    *
@@ -572,7 +550,8 @@ public final class GenMapRedUtils {
     // Track the dependencies for the view. Consider a query like: select * from V;
     // where V is a view of the form: select * from T
     // The dependencies should include V at depth 0, and T at depth 1 (inferred).
-    ReadEntity parentViewInfo = getParentViewInfo(alias_id, parseCtx.getViewAliasToInput());
+    Map<String, ReadEntity> viewToInput = parseCtx.getViewAliasToInput();
+    ReadEntity parentViewInfo = PlanUtils.getParentViewInfo(alias_id, viewToInput);
 
     // The table should also be considered a part of inputs, even if the table is a
     // partitioned table and whether any partition is selected or not

Modified: hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/optimizer/SimpleFetchOptimizer.java
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/optimizer/SimpleFetchOptimizer.java?rev=1564472&r1=1564471&r2=1564472&view=diff
==============================================================================
--- hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/optimizer/SimpleFetchOptimizer.java (original)
+++ hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/optimizer/SimpleFetchOptimizer.java Tue Feb  4 20:34:39 2014
@@ -155,8 +155,9 @@ public class SimpleFetchOptimizer implem
     if (table == null) {
       return null;
     }
+    ReadEntity parent = PlanUtils.getParentViewInfo(alias, pctx.getViewAliasToInput());
     if (!table.isPartitioned()) {
-      return checkOperators(new FetchData(table, splitSample), ts, aggressive, false);
+      return checkOperators(new FetchData(parent, table, splitSample), ts, aggressive, false);
     }
 
     boolean bypassFilter = false;
@@ -168,7 +169,7 @@ public class SimpleFetchOptimizer implem
       PrunedPartitionList pruned = pctx.getPrunedPartitions(alias, ts);
       if (aggressive || !pruned.hasUnknownPartitions()) {
         bypassFilter &= !pruned.hasUnknownPartitions();
-        return checkOperators(new FetchData(table, pruned, splitSample), ts,
+        return checkOperators(new FetchData(parent, table, pruned, splitSample), ts,
             aggressive, bypassFilter);
       }
     }
@@ -205,6 +206,7 @@ public class SimpleFetchOptimizer implem
 
   private class FetchData {
 
+    private final ReadEntity parent;
     private final Table table;
     private final SplitSample splitSample;
     private final PrunedPartitionList partsList;
@@ -216,13 +218,16 @@ public class SimpleFetchOptimizer implem
     // this is always non-null when conversion is completed
     private Operator<?> fileSink;
 
-    private FetchData(Table table, SplitSample splitSample) {
+    private FetchData(ReadEntity parent, Table table, SplitSample splitSample) {
+      this.parent = parent;
       this.table = table;
       this.partsList = null;
       this.splitSample = splitSample;
     }
 
-    private FetchData(Table table, PrunedPartitionList partsList, SplitSample splitSample) {
+    private FetchData(ReadEntity parent, Table table, PrunedPartitionList partsList,
+        SplitSample splitSample) {
+      this.parent = parent;
       this.table = table;
       this.partsList = partsList;
       this.splitSample = splitSample;
@@ -231,7 +236,7 @@ public class SimpleFetchOptimizer implem
     private FetchWork convertToWork() throws HiveException {
       inputs.clear();
       if (!table.isPartitioned()) {
-        inputs.add(new ReadEntity(table));
+        inputs.add(new ReadEntity(table, parent));
         FetchWork work = new FetchWork(table.getPath(), Utilities.getTableDesc(table));
         PlanUtils.configureInputJobPropertiesForStorageHandler(work.getTblDesc());
         work.setSplitSample(splitSample);
@@ -241,12 +246,12 @@ public class SimpleFetchOptimizer implem
       List<PartitionDesc> partP = new ArrayList<PartitionDesc>();
 
       for (Partition partition : partsList.getNotDeniedPartns()) {
-        inputs.add(new ReadEntity(partition));
+        inputs.add(new ReadEntity(partition, parent));
         listP.add(partition.getDataLocation());
         partP.add(Utilities.getPartitionDesc(partition));
       }
       Table sourceTable = partsList.getSourceTable();
-      inputs.add(new ReadEntity(sourceTable));
+      inputs.add(new ReadEntity(sourceTable, parent));
       TableDesc table = Utilities.getTableDesc(sourceTable);
       FetchWork work = new FetchWork(listP, partP, table);
       if (!work.getPartDesc().isEmpty()) {
@@ -261,7 +266,9 @@ public class SimpleFetchOptimizer implem
     // single direct fetching, which means FS is not needed any more when conversion completed.
     // rows forwarded will be received by ListSinkOperator, which is replacing FS
     private ListSinkOperator completed(ParseContext pctx, FetchWork work) {
-      pctx.getSemanticInputs().addAll(inputs);
+      for (ReadEntity input : inputs) {
+        PlanUtils.addInput(pctx.getSemanticInputs(), input);
+      }
       return replaceFSwithLS(fileSink, work.getSerializationNullFormat());
     }
 

Modified: hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java?rev=1564472&r1=1564471&r2=1564472&view=diff
==============================================================================
--- hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java (original)
+++ hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java Tue Feb  4 20:34:39 2014
@@ -8917,6 +8917,15 @@ public class SemanticAnalyzer extends Ba
     resultSchema =
         convertRowSchemaToViewSchema(opParseCtx.get(sinkOp).getRowResolver());
 
+    ParseContext pCtx = new ParseContext(conf, qb, child, opToPartPruner,
+        opToPartList, topOps, topSelOps, opParseCtx, joinContext, smbMapJoinContext,
+        topToTable, topToTableProps, fsopToTable,
+        loadTableWork, loadFileWork, ctx, idToTableNameMap, destTableId, uCtx,
+        listMapJoinOpsNoReducer, groupOpToInputTables, prunedPartitions,
+        opToSamplePruner, globalLimitCtx, nameToSplitSample, inputs, rootTasks,
+        opToPartToSkewedPruner, viewAliasToInput,
+        reduceSinkOperatorsAddedByEnforceBucketingSorting, queryProperties);
+
     if (createVwDesc != null) {
       saveViewDefinition();
 
@@ -8930,18 +8939,15 @@ public class SemanticAnalyzer extends Ba
       // skip the rest of this method.
       ctx.setResDir(null);
       ctx.setResFile(null);
+
+      try {
+        PlanUtils.addInputsForView(pCtx);
+      } catch (HiveException e) {
+        throw new SemanticException(e);
+      }
       return;
     }
 
-    ParseContext pCtx = new ParseContext(conf, qb, child, opToPartPruner,
-        opToPartList, topOps, topSelOps, opParseCtx, joinContext, smbMapJoinContext,
-        topToTable, topToTableProps, fsopToTable,
-        loadTableWork, loadFileWork, ctx, idToTableNameMap, destTableId, uCtx,
-        listMapJoinOpsNoReducer, groupOpToInputTables, prunedPartitions,
-        opToSamplePruner, globalLimitCtx, nameToSplitSample, inputs, rootTasks,
-        opToPartToSkewedPruner, viewAliasToInput,
-        reduceSinkOperatorsAddedByEnforceBucketingSorting, queryProperties);
-
     // Generate table access stats if required
     if (HiveConf.getBoolVar(this.conf, HiveConf.ConfVars.HIVE_STATS_COLLECT_TABLEKEYS) == true) {
       TableAccessAnalyzer tableAccessAnalyzer = new TableAccessAnalyzer(pCtx);

Modified: hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/plan/HiveOperation.java
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/plan/HiveOperation.java?rev=1564472&r1=1564471&r2=1564472&view=diff
==============================================================================
--- hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/plan/HiveOperation.java (original)
+++ hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/plan/HiveOperation.java Tue Feb  4 20:34:39 2014
@@ -70,8 +70,8 @@ public enum HiveOperation {
   DROPFUNCTION("DROPFUNCTION", null, null),
   CREATEMACRO("CREATEMACRO", null, null),
   DROPMACRO("DROPMACRO", null, null),
-  CREATEVIEW("CREATEVIEW", null, null),
-  DROPVIEW("DROPVIEW", null, null),
+  CREATEVIEW("CREATEVIEW", new Privilege[]{Privilege.SELECT}, new Privilege[]{Privilege.CREATE}),
+  DROPVIEW("DROPVIEW", null, new Privilege[]{Privilege.DROP}),
   CREATEINDEX("CREATEINDEX", null, null),
   DROPINDEX("DROPINDEX", null, null),
   ALTERINDEX_REBUILD("ALTERINDEX_REBUILD", null, null),

Modified: hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/plan/PlanUtils.java
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/plan/PlanUtils.java?rev=1564472&r1=1564471&r2=1564472&view=diff
==============================================================================
--- hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/plan/PlanUtils.java (original)
+++ hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/plan/PlanUtils.java Tue Feb  4 20:34:39 2014
@@ -36,7 +36,9 @@ import org.apache.hadoop.hive.conf.HiveC
 import org.apache.hadoop.hive.metastore.MetaStoreUtils;
 import org.apache.hadoop.hive.metastore.api.FieldSchema;
 import org.apache.hadoop.hive.ql.exec.ColumnInfo;
+import org.apache.hadoop.hive.ql.exec.Operator;
 import org.apache.hadoop.hive.ql.exec.RowSchema;
+import org.apache.hadoop.hive.ql.exec.TableScanOperator;
 import org.apache.hadoop.hive.ql.exec.Utilities;
 import org.apache.hadoop.hive.ql.hooks.ReadEntity;
 import org.apache.hadoop.hive.ql.io.HiveFileFormatUtils;
@@ -49,6 +51,8 @@ import org.apache.hadoop.hive.ql.metadat
 import org.apache.hadoop.hive.ql.metadata.HiveException;
 import org.apache.hadoop.hive.ql.metadata.HiveStorageHandler;
 import org.apache.hadoop.hive.ql.metadata.HiveUtils;
+import org.apache.hadoop.hive.ql.metadata.Table;
+import org.apache.hadoop.hive.ql.parse.ParseContext;
 import org.apache.hadoop.hive.ql.parse.SemanticException;
 import org.apache.hadoop.hive.ql.parse.TypeCheckProcFactory;
 import org.apache.hadoop.hive.ql.session.SessionState;
@@ -938,4 +942,42 @@ public final class PlanUtils {
     sb.append(expr.getTypeString());
     sb.append(")");
   }
+
+  public static void addInputsForView(ParseContext parseCtx) throws HiveException {
+    Set<ReadEntity> inputs = parseCtx.getSemanticInputs();
+    for (Map.Entry<String, Operator<?>> entry : parseCtx.getTopOps().entrySet()) {
+      if (!(entry.getValue() instanceof TableScanOperator)) {
+        continue;
+      }
+      String alias = entry.getKey();
+      TableScanOperator topOp = (TableScanOperator) entry.getValue();
+      ReadEntity parentViewInfo = getParentViewInfo(alias, parseCtx.getViewAliasToInput());
+
+      // Adds tables only for create view (PPD filter can be appended by outer query)
+      Table table = parseCtx.getTopToTable().get(topOp);
+      PlanUtils.addInput(inputs, new ReadEntity(table, parentViewInfo));
+    }
+  }
+
+  public static ReadEntity getParentViewInfo(String alias_id,
+      Map<String, ReadEntity> viewAliasToInput) {
+    String[] aliases = alias_id.split(":");
+
+    String currentAlias = null;
+    ReadEntity currentInput = null;
+    // Find the immediate parent possible.
+    // For eg: for a query like 'select * from V3', where V3 -> V2, V2 -> V1, V1 -> T
+    // -> implies depends on.
+    // T's parent would be V1
+    for (int pos = 0; pos < aliases.length; pos++) {
+      currentAlias = currentAlias == null ? aliases[pos] : currentAlias + ":" + aliases[pos];
+      ReadEntity input = viewAliasToInput.get(currentAlias);
+      if (input == null) {
+        return currentInput;
+      }
+      currentInput = input;
+    }
+
+    return currentInput;
+  }
 }

Modified: hive/trunk/ql/src/test/results/clientnegative/alter_view_as_select_with_partition.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientnegative/alter_view_as_select_with_partition.q.out?rev=1564472&r1=1564471&r2=1564472&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientnegative/alter_view_as_select_with_partition.q.out (original)
+++ hive/trunk/ql/src/test/results/clientnegative/alter_view_as_select_with_partition.q.out Tue Feb  4 20:34:39 2014
@@ -4,12 +4,14 @@ SELECT key, value
 FROM src
 WHERE key=86
 PREHOOK: type: CREATEVIEW
+PREHOOK: Input: default@src
 POSTHOOK: query: CREATE VIEW testViewPart PARTITIONED ON (value)
 AS
 SELECT key, value
 FROM src
 WHERE key=86
 POSTHOOK: type: CREATEVIEW
+POSTHOOK: Input: default@src
 POSTHOOK: Output: default@testViewPart
 PREHOOK: query: ALTER VIEW testViewPart 
 ADD PARTITION (value='val_86') PARTITION (value='val_xyz')

Modified: hive/trunk/ql/src/test/results/clientnegative/alter_view_failure.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientnegative/alter_view_failure.q.out?rev=1564472&r1=1564471&r2=1564472&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientnegative/alter_view_failure.q.out (original)
+++ hive/trunk/ql/src/test/results/clientnegative/alter_view_failure.q.out Tue Feb  4 20:34:39 2014
@@ -4,7 +4,9 @@ POSTHOOK: query: DROP VIEW xxx3
 POSTHOOK: type: DROPVIEW
 PREHOOK: query: CREATE VIEW xxx3 AS SELECT * FROM src
 PREHOOK: type: CREATEVIEW
+PREHOOK: Input: default@src
 POSTHOOK: query: CREATE VIEW xxx3 AS SELECT * FROM src
 POSTHOOK: type: CREATEVIEW
+POSTHOOK: Input: default@src
 POSTHOOK: Output: default@xxx3
 FAILED: SemanticException [Error 10131]: To alter a view you need to use the ALTER VIEW command.

Modified: hive/trunk/ql/src/test/results/clientnegative/alter_view_failure2.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientnegative/alter_view_failure2.q.out?rev=1564472&r1=1564471&r2=1564472&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientnegative/alter_view_failure2.q.out (original)
+++ hive/trunk/ql/src/test/results/clientnegative/alter_view_failure2.q.out Tue Feb  4 20:34:39 2014
@@ -7,10 +7,12 @@ PARTITIONED ON (value)
 AS 
 SELECT * FROM src
 PREHOOK: type: CREATEVIEW
+PREHOOK: Input: default@src
 POSTHOOK: query: CREATE VIEW xxx4 
 PARTITIONED ON (value)
 AS 
 SELECT * FROM src
 POSTHOOK: type: CREATEVIEW
+POSTHOOK: Input: default@src
 POSTHOOK: Output: default@xxx4
 FAILED: SemanticException [Error 10131]: To alter a view you need to use the ALTER VIEW command.

Modified: hive/trunk/ql/src/test/results/clientnegative/alter_view_failure4.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientnegative/alter_view_failure4.q.out?rev=1564472&r1=1564471&r2=1564472&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientnegative/alter_view_failure4.q.out (original)
+++ hive/trunk/ql/src/test/results/clientnegative/alter_view_failure4.q.out Tue Feb  4 20:34:39 2014
@@ -7,10 +7,12 @@ PARTITIONED ON (value)
 AS 
 SELECT * FROM src
 PREHOOK: type: CREATEVIEW
+PREHOOK: Input: default@src
 POSTHOOK: query: CREATE VIEW xxx5
 PARTITIONED ON (value)
 AS 
 SELECT * FROM src
 POSTHOOK: type: CREATEVIEW
+POSTHOOK: Input: default@src
 POSTHOOK: Output: default@xxx5
 FAILED: SemanticException LOCATION clause illegal for view partition

Modified: hive/trunk/ql/src/test/results/clientnegative/alter_view_failure5.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientnegative/alter_view_failure5.q.out?rev=1564472&r1=1564471&r2=1564472&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientnegative/alter_view_failure5.q.out (original)
+++ hive/trunk/ql/src/test/results/clientnegative/alter_view_failure5.q.out Tue Feb  4 20:34:39 2014
@@ -7,10 +7,12 @@ PARTITIONED ON (value)
 AS 
 SELECT * FROM src
 PREHOOK: type: CREATEVIEW
+PREHOOK: Input: default@src
 POSTHOOK: query: CREATE VIEW xxx6
 PARTITIONED ON (value)
 AS 
 SELECT * FROM src
 POSTHOOK: type: CREATEVIEW
+POSTHOOK: Input: default@src
 POSTHOOK: Output: default@xxx6
 FAILED: SemanticException Partition spec {v=val_86} contains non-partition columns

Modified: hive/trunk/ql/src/test/results/clientnegative/alter_view_failure6.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientnegative/alter_view_failure6.q.out?rev=1564472&r1=1564471&r2=1564472&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientnegative/alter_view_failure6.q.out (original)
+++ hive/trunk/ql/src/test/results/clientnegative/alter_view_failure6.q.out Tue Feb  4 20:34:39 2014
@@ -7,11 +7,13 @@ PARTITIONED ON (key)
 AS 
 SELECT hr,key FROM srcpart
 PREHOOK: type: CREATEVIEW
+PREHOOK: Input: default@srcpart
 POSTHOOK: query: CREATE VIEW xxx7
 PARTITIONED ON (key)
 AS 
 SELECT hr,key FROM srcpart
 POSTHOOK: type: CREATEVIEW
+POSTHOOK: Input: default@srcpart
 POSTHOOK: Output: default@xxx7
 FAILED: SemanticException [Error 10041]: No partition predicate found for Alias "xxx7:srcpart" Table "srcpart"
 FAILED: SemanticException [Error 10056]: The query does not reference any valid partition. To run this query, set hive.mapred.mode=nonstrict

Modified: hive/trunk/ql/src/test/results/clientnegative/alter_view_failure7.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientnegative/alter_view_failure7.q.out?rev=1564472&r1=1564471&r2=1564472&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientnegative/alter_view_failure7.q.out (original)
+++ hive/trunk/ql/src/test/results/clientnegative/alter_view_failure7.q.out Tue Feb  4 20:34:39 2014
@@ -7,10 +7,12 @@ PARTITIONED ON (ds,hr)
 AS 
 SELECT key,ds,hr FROM srcpart
 PREHOOK: type: CREATEVIEW
+PREHOOK: Input: default@srcpart
 POSTHOOK: query: CREATE VIEW xxx8
 PARTITIONED ON (ds,hr)
 AS 
 SELECT key,ds,hr FROM srcpart
 POSTHOOK: type: CREATEVIEW
+POSTHOOK: Input: default@srcpart
 POSTHOOK: Output: default@xxx8
 FAILED: SemanticException partition spec {ds=2011-01-01} doesn't contain all (2) partition columns

Modified: hive/trunk/ql/src/test/results/clientnegative/alter_view_failure9.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientnegative/alter_view_failure9.q.out?rev=1564472&r1=1564471&r2=1564472&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientnegative/alter_view_failure9.q.out (original)
+++ hive/trunk/ql/src/test/results/clientnegative/alter_view_failure9.q.out Tue Feb  4 20:34:39 2014
@@ -6,9 +6,11 @@ PREHOOK: query: CREATE VIEW xxx4 
 AS 
 SELECT * FROM src
 PREHOOK: type: CREATEVIEW
+PREHOOK: Input: default@src
 POSTHOOK: query: CREATE VIEW xxx4 
 AS 
 SELECT * FROM src
 POSTHOOK: type: CREATEVIEW
+POSTHOOK: Input: default@src
 POSTHOOK: Output: default@xxx4
 FAILED: SemanticException [Error 10131]: To alter a view you need to use the ALTER VIEW command.

Modified: hive/trunk/ql/src/test/results/clientnegative/analyze_view.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientnegative/analyze_view.q.out?rev=1564472&r1=1564471&r2=1564472&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientnegative/analyze_view.q.out (original)
+++ hive/trunk/ql/src/test/results/clientnegative/analyze_view.q.out Tue Feb  4 20:34:39 2014
@@ -4,7 +4,9 @@ POSTHOOK: query: DROP VIEW av
 POSTHOOK: type: DROPVIEW
 PREHOOK: query: CREATE VIEW av AS SELECT * FROM src
 PREHOOK: type: CREATEVIEW
+PREHOOK: Input: default@src
 POSTHOOK: query: CREATE VIEW av AS SELECT * FROM src
 POSTHOOK: type: CREATEVIEW
+POSTHOOK: Input: default@src
 POSTHOOK: Output: default@av
 FAILED: SemanticException [Error 10091]: ANALYZE is not supported for views

Modified: hive/trunk/ql/src/test/results/clientnegative/create_or_replace_view1.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientnegative/create_or_replace_view1.q.out?rev=1564472&r1=1564471&r2=1564472&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientnegative/create_or_replace_view1.q.out (original)
+++ hive/trunk/ql/src/test/results/clientnegative/create_or_replace_view1.q.out Tue Feb  4 20:34:39 2014
@@ -8,8 +8,10 @@ drop view v
 POSTHOOK: type: DROPVIEW
 PREHOOK: query: create view v partitioned on (ds, hr) as select * from srcpart
 PREHOOK: type: CREATEVIEW
+PREHOOK: Input: default@srcpart
 POSTHOOK: query: create view v partitioned on (ds, hr) as select * from srcpart
 POSTHOOK: type: CREATEVIEW
+POSTHOOK: Input: default@srcpart
 POSTHOOK: Output: default@v
 PREHOOK: query: alter view v add partition (ds='1',hr='2')
 PREHOOK: type: ALTERTABLE_ADDPARTS

Modified: hive/trunk/ql/src/test/results/clientnegative/create_or_replace_view2.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientnegative/create_or_replace_view2.q.out?rev=1564472&r1=1564471&r2=1564472&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientnegative/create_or_replace_view2.q.out (original)
+++ hive/trunk/ql/src/test/results/clientnegative/create_or_replace_view2.q.out Tue Feb  4 20:34:39 2014
@@ -8,8 +8,10 @@ drop view v
 POSTHOOK: type: DROPVIEW
 PREHOOK: query: create view v partitioned on (ds, hr) as select * from srcpart
 PREHOOK: type: CREATEVIEW
+PREHOOK: Input: default@srcpart
 POSTHOOK: query: create view v partitioned on (ds, hr) as select * from srcpart
 POSTHOOK: type: CREATEVIEW
+POSTHOOK: Input: default@srcpart
 POSTHOOK: Output: default@v
 PREHOOK: query: alter view v add partition (ds='1',hr='2')
 PREHOOK: type: ALTERTABLE_ADDPARTS

Modified: hive/trunk/ql/src/test/results/clientnegative/create_or_replace_view4.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientnegative/create_or_replace_view4.q.out?rev=1564472&r1=1564471&r2=1564472&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientnegative/create_or_replace_view4.q.out (original)
+++ hive/trunk/ql/src/test/results/clientnegative/create_or_replace_view4.q.out Tue Feb  4 20:34:39 2014
@@ -8,7 +8,9 @@ drop view v
 POSTHOOK: type: DROPVIEW
 PREHOOK: query: create view v partitioned on (ds, hr) as select * from srcpart
 PREHOOK: type: CREATEVIEW
+PREHOOK: Input: default@srcpart
 POSTHOOK: query: create view v partitioned on (ds, hr) as select * from srcpart
 POSTHOOK: type: CREATEVIEW
+POSTHOOK: Input: default@srcpart
 POSTHOOK: Output: default@v
 FAILED: SemanticException [Error 10092]: At least one non-partitioning column must be present in view

Modified: hive/trunk/ql/src/test/results/clientnegative/create_or_replace_view5.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientnegative/create_or_replace_view5.q.out?rev=1564472&r1=1564471&r2=1564472&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientnegative/create_or_replace_view5.q.out (original)
+++ hive/trunk/ql/src/test/results/clientnegative/create_or_replace_view5.q.out Tue Feb  4 20:34:39 2014
@@ -8,7 +8,9 @@ drop view v
 POSTHOOK: type: DROPVIEW
 PREHOOK: query: create view v partitioned on (ds, hr) as select * from srcpart
 PREHOOK: type: CREATEVIEW
+PREHOOK: Input: default@srcpart
 POSTHOOK: query: create view v partitioned on (ds, hr) as select * from srcpart
 POSTHOOK: type: CREATEVIEW
+POSTHOOK: Input: default@srcpart
 POSTHOOK: Output: default@v
 FAILED: SemanticException Can't combine IF NOT EXISTS and OR REPLACE.

Modified: hive/trunk/ql/src/test/results/clientnegative/create_or_replace_view6.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientnegative/create_or_replace_view6.q.out?rev=1564472&r1=1564471&r2=1564472&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientnegative/create_or_replace_view6.q.out (original)
+++ hive/trunk/ql/src/test/results/clientnegative/create_or_replace_view6.q.out Tue Feb  4 20:34:39 2014
@@ -8,7 +8,9 @@ drop view v
 POSTHOOK: type: DROPVIEW
 PREHOOK: query: create view v partitioned on (ds, hr) as select * from srcpart
 PREHOOK: type: CREATEVIEW
+PREHOOK: Input: default@srcpart
 POSTHOOK: query: create view v partitioned on (ds, hr) as select * from srcpart
 POSTHOOK: type: CREATEVIEW
+POSTHOOK: Input: default@srcpart
 POSTHOOK: Output: default@v
 FAILED: ParseException line 2:52 cannot recognize input near 'blah' '<EOF>' '<EOF>' in select clause

Modified: hive/trunk/ql/src/test/results/clientnegative/create_or_replace_view7.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientnegative/create_or_replace_view7.q.out?rev=1564472&r1=1564471&r2=1564472&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientnegative/create_or_replace_view7.q.out (original)
+++ hive/trunk/ql/src/test/results/clientnegative/create_or_replace_view7.q.out Tue Feb  4 20:34:39 2014
@@ -8,22 +8,28 @@ drop view v
 POSTHOOK: type: DROPVIEW
 PREHOOK: query: create view v1 partitioned on (ds, hr) as select * from srcpart
 PREHOOK: type: CREATEVIEW
+PREHOOK: Input: default@srcpart
 POSTHOOK: query: create view v1 partitioned on (ds, hr) as select * from srcpart
 POSTHOOK: type: CREATEVIEW
+POSTHOOK: Input: default@srcpart
 POSTHOOK: Output: default@v1
 PREHOOK: query: create view v2 partitioned on (ds, hr) as select * from v1
 PREHOOK: type: CREATEVIEW
+PREHOOK: Input: default@srcpart
 PREHOOK: Input: default@v1
 POSTHOOK: query: create view v2 partitioned on (ds, hr) as select * from v1
 POSTHOOK: type: CREATEVIEW
+POSTHOOK: Input: default@srcpart
 POSTHOOK: Input: default@v1
 POSTHOOK: Output: default@v2
 PREHOOK: query: create view v3 partitioned on (ds, hr) as select * from v2
 PREHOOK: type: CREATEVIEW
+PREHOOK: Input: default@srcpart
 PREHOOK: Input: default@v1
 PREHOOK: Input: default@v2
 POSTHOOK: query: create view v3 partitioned on (ds, hr) as select * from v2
 POSTHOOK: type: CREATEVIEW
+POSTHOOK: Input: default@srcpart
 POSTHOOK: Input: default@v1
 POSTHOOK: Input: default@v2
 POSTHOOK: Output: default@v3

Modified: hive/trunk/ql/src/test/results/clientnegative/create_or_replace_view8.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientnegative/create_or_replace_view8.q.out?rev=1564472&r1=1564471&r2=1564472&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientnegative/create_or_replace_view8.q.out (original)
+++ hive/trunk/ql/src/test/results/clientnegative/create_or_replace_view8.q.out Tue Feb  4 20:34:39 2014
@@ -8,7 +8,9 @@ drop view v
 POSTHOOK: type: DROPVIEW
 PREHOOK: query: create view v1 partitioned on (ds, hr) as select * from srcpart
 PREHOOK: type: CREATEVIEW
+PREHOOK: Input: default@srcpart
 POSTHOOK: query: create view v1 partitioned on (ds, hr) as select * from srcpart
 POSTHOOK: type: CREATEVIEW
+POSTHOOK: Input: default@srcpart
 POSTHOOK: Output: default@v1
 FAILED: SemanticException Recursive view default.v1 detected (cycle: default.v1 -> default.v1).

Modified: hive/trunk/ql/src/test/results/clientnegative/create_view_failure1.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientnegative/create_view_failure1.q.out?rev=1564472&r1=1564471&r2=1564472&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientnegative/create_view_failure1.q.out (original)
+++ hive/trunk/ql/src/test/results/clientnegative/create_view_failure1.q.out Tue Feb  4 20:34:39 2014
@@ -11,4 +11,5 @@ POSTHOOK: type: CREATETABLE
 POSTHOOK: Output: default@xxx12
 PREHOOK: query: CREATE VIEW xxx12 AS SELECT key FROM src
 PREHOOK: type: CREATEVIEW
+PREHOOK: Input: default@src
 FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. AlreadyExistsException(message:Table xxx12 already exists)

Modified: hive/trunk/ql/src/test/results/clientnegative/create_view_failure2.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientnegative/create_view_failure2.q.out?rev=1564472&r1=1564471&r2=1564472&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientnegative/create_view_failure2.q.out (original)
+++ hive/trunk/ql/src/test/results/clientnegative/create_view_failure2.q.out Tue Feb  4 20:34:39 2014
@@ -5,9 +5,11 @@ POSTHOOK: type: DROPVIEW
 PREHOOK: query: -- views and tables share the same namespace
 CREATE VIEW xxx4 AS SELECT key FROM src
 PREHOOK: type: CREATEVIEW
+PREHOOK: Input: default@src
 POSTHOOK: query: -- views and tables share the same namespace
 CREATE VIEW xxx4 AS SELECT key FROM src
 POSTHOOK: type: CREATEVIEW
+POSTHOOK: Input: default@src
 POSTHOOK: Output: default@xxx4
 PREHOOK: query: CREATE TABLE xxx4(key int)
 PREHOOK: type: CREATETABLE

Modified: hive/trunk/ql/src/test/results/clientnegative/create_view_failure4.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientnegative/create_view_failure4.q.out?rev=1564472&r1=1564471&r2=1564472&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientnegative/create_view_failure4.q.out (original)
+++ hive/trunk/ql/src/test/results/clientnegative/create_view_failure4.q.out Tue Feb  4 20:34:39 2014
@@ -6,4 +6,5 @@ PREHOOK: query: -- duplicate column name
 CREATE VIEW xxx5(x,x) AS
 SELECT key,value FROM src
 PREHOOK: type: CREATEVIEW
+PREHOOK: Input: default@src
 FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. org.apache.hadoop.hive.ql.metadata.HiveException: Duplicate column name x in the table definition.

Modified: hive/trunk/ql/src/test/results/clientnegative/drop_table_failure2.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientnegative/drop_table_failure2.q.out?rev=1564472&r1=1564471&r2=1564472&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientnegative/drop_table_failure2.q.out (original)
+++ hive/trunk/ql/src/test/results/clientnegative/drop_table_failure2.q.out Tue Feb  4 20:34:39 2014
@@ -1,7 +1,9 @@
 PREHOOK: query: CREATE VIEW xxx6 AS SELECT key FROM src
 PREHOOK: type: CREATEVIEW
+PREHOOK: Input: default@src
 POSTHOOK: query: CREATE VIEW xxx6 AS SELECT key FROM src
 POSTHOOK: type: CREATEVIEW
+POSTHOOK: Input: default@src
 POSTHOOK: Output: default@xxx6
 PREHOOK: query: -- Can't use DROP TABLE on a view
 DROP TABLE xxx6

Modified: hive/trunk/ql/src/test/results/clientnegative/insert_view_failure.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientnegative/insert_view_failure.q.out?rev=1564472&r1=1564471&r2=1564472&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientnegative/insert_view_failure.q.out (original)
+++ hive/trunk/ql/src/test/results/clientnegative/insert_view_failure.q.out Tue Feb  4 20:34:39 2014
@@ -4,7 +4,9 @@ POSTHOOK: query: DROP VIEW xxx2
 POSTHOOK: type: DROPVIEW
 PREHOOK: query: CREATE VIEW xxx2 AS SELECT * FROM src
 PREHOOK: type: CREATEVIEW
+PREHOOK: Input: default@src
 POSTHOOK: query: CREATE VIEW xxx2 AS SELECT * FROM src
 POSTHOOK: type: CREATEVIEW
+POSTHOOK: Input: default@src
 POSTHOOK: Output: default@xxx2
 FAILED: SemanticException [Error 10090]: A view cannot be used as target table for LOAD or INSERT

Modified: hive/trunk/ql/src/test/results/clientnegative/invalidate_view1.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientnegative/invalidate_view1.q.out?rev=1564472&r1=1564471&r2=1564472&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientnegative/invalidate_view1.q.out (original)
+++ hive/trunk/ql/src/test/results/clientnegative/invalidate_view1.q.out Tue Feb  4 20:34:39 2014
@@ -19,14 +19,18 @@ POSTHOOK: type: CREATETABLE
 POSTHOOK: Output: default@xxx10
 PREHOOK: query: CREATE VIEW xxx9 AS SELECT * FROM xxx10
 PREHOOK: type: CREATEVIEW
+PREHOOK: Input: default@xxx10
 POSTHOOK: query: CREATE VIEW xxx9 AS SELECT * FROM xxx10
 POSTHOOK: type: CREATEVIEW
+POSTHOOK: Input: default@xxx10
 POSTHOOK: Output: default@xxx9
 PREHOOK: query: CREATE VIEW xxx8 AS SELECT * FROM xxx9 xxx
 PREHOOK: type: CREATEVIEW
+PREHOOK: Input: default@xxx10
 PREHOOK: Input: default@xxx9
 POSTHOOK: query: CREATE VIEW xxx8 AS SELECT * FROM xxx9 xxx
 POSTHOOK: type: CREATEVIEW
+POSTHOOK: Input: default@xxx10
 POSTHOOK: Input: default@xxx9
 POSTHOOK: Output: default@xxx8
 PREHOOK: query: ALTER TABLE xxx10 REPLACE COLUMNS (key int)

Modified: hive/trunk/ql/src/test/results/clientnegative/load_view_failure.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientnegative/load_view_failure.q.out?rev=1564472&r1=1564471&r2=1564472&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientnegative/load_view_failure.q.out (original)
+++ hive/trunk/ql/src/test/results/clientnegative/load_view_failure.q.out Tue Feb  4 20:34:39 2014
@@ -4,7 +4,9 @@ POSTHOOK: query: DROP VIEW xxx11
 POSTHOOK: type: DROPVIEW
 PREHOOK: query: CREATE VIEW xxx11 AS SELECT * FROM src
 PREHOOK: type: CREATEVIEW
+PREHOOK: Input: default@src
 POSTHOOK: query: CREATE VIEW xxx11 AS SELECT * FROM src
 POSTHOOK: type: CREATEVIEW
+POSTHOOK: Input: default@src
 POSTHOOK: Output: default@xxx11
 FAILED: SemanticException [Error 10090]: A view cannot be used as target table for LOAD or INSERT

Modified: hive/trunk/ql/src/test/results/clientnegative/recursive_view.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientnegative/recursive_view.q.out?rev=1564472&r1=1564471&r2=1564472&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientnegative/recursive_view.q.out (original)
+++ hive/trunk/ql/src/test/results/clientnegative/recursive_view.q.out Tue Feb  4 20:34:39 2014
@@ -29,35 +29,43 @@ POSTHOOK: type: CREATETABLE
 POSTHOOK: Output: default@t
 PREHOOK: query: create view r0 as select * from t
 PREHOOK: type: CREATEVIEW
+PREHOOK: Input: default@t
 POSTHOOK: query: create view r0 as select * from t
 POSTHOOK: type: CREATEVIEW
+POSTHOOK: Input: default@t
 POSTHOOK: Output: default@r0
 PREHOOK: query: create view r1 as select * from r0
 PREHOOK: type: CREATEVIEW
 PREHOOK: Input: default@r0
+PREHOOK: Input: default@t
 POSTHOOK: query: create view r1 as select * from r0
 POSTHOOK: type: CREATEVIEW
 POSTHOOK: Input: default@r0
+POSTHOOK: Input: default@t
 POSTHOOK: Output: default@r1
 PREHOOK: query: create view r2 as select * from r1
 PREHOOK: type: CREATEVIEW
 PREHOOK: Input: default@r0
 PREHOOK: Input: default@r1
+PREHOOK: Input: default@t
 POSTHOOK: query: create view r2 as select * from r1
 POSTHOOK: type: CREATEVIEW
 POSTHOOK: Input: default@r0
 POSTHOOK: Input: default@r1
+POSTHOOK: Input: default@t
 POSTHOOK: Output: default@r2
 PREHOOK: query: create view r3 as select * from r2
 PREHOOK: type: CREATEVIEW
 PREHOOK: Input: default@r0
 PREHOOK: Input: default@r1
 PREHOOK: Input: default@r2
+PREHOOK: Input: default@t
 POSTHOOK: query: create view r3 as select * from r2
 POSTHOOK: type: CREATEVIEW
 POSTHOOK: Input: default@r0
 POSTHOOK: Input: default@r1
 POSTHOOK: Input: default@r2
+POSTHOOK: Input: default@t
 POSTHOOK: Output: default@r3
 PREHOOK: query: drop view r0
 PREHOOK: type: DROPVIEW

Modified: hive/trunk/ql/src/test/results/clientnegative/unset_view_property.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientnegative/unset_view_property.q.out?rev=1564472&r1=1564471&r2=1564472&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientnegative/unset_view_property.q.out (original)
+++ hive/trunk/ql/src/test/results/clientnegative/unset_view_property.q.out Tue Feb  4 20:34:39 2014
@@ -1,7 +1,9 @@
 PREHOOK: query: CREATE VIEW testView AS SELECT value FROM src WHERE key=86
 PREHOOK: type: CREATEVIEW
+PREHOOK: Input: default@src
 POSTHOOK: query: CREATE VIEW testView AS SELECT value FROM src WHERE key=86
 POSTHOOK: type: CREATEVIEW
+POSTHOOK: Input: default@src
 POSTHOOK: Output: default@testView
 PREHOOK: query: ALTER VIEW testView SET TBLPROPERTIES ('propA'='100', 'propB'='200')
 PREHOOK: type: ALTERVIEW_PROPERTIES

Modified: hive/trunk/ql/src/test/results/clientpositive/alter_view_as_select.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/alter_view_as_select.q.out?rev=1564472&r1=1564471&r2=1564472&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/alter_view_as_select.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/alter_view_as_select.q.out Tue Feb  4 20:34:39 2014
@@ -4,8 +4,10 @@ POSTHOOK: query: DROP VIEW testView
 POSTHOOK: type: DROPVIEW
 PREHOOK: query: CREATE VIEW testView as SELECT * FROM srcpart
 PREHOOK: type: CREATEVIEW
+PREHOOK: Input: default@srcpart
 POSTHOOK: query: CREATE VIEW testView as SELECT * FROM srcpart
 POSTHOOK: type: CREATEVIEW
+POSTHOOK: Input: default@srcpart
 POSTHOOK: Output: default@testView
 PREHOOK: query: DESCRIBE FORMATTED testView
 PREHOOK: type: DESCTABLE
@@ -41,8 +43,10 @@ View Original Text: 	SELECT * FROM srcpa
 View Expanded Text: 	SELECT `srcpart`.`key`, `srcpart`.`value`, `srcpart`.`ds`, `srcpart`.`hr` FROM `default`.`srcpart`	 
 PREHOOK: query: ALTER VIEW testView AS SELECT value FROM src WHERE key=86
 PREHOOK: type: CREATEVIEW
+PREHOOK: Input: default@src
 POSTHOOK: query: ALTER VIEW testView AS SELECT value FROM src WHERE key=86
 POSTHOOK: type: CREATEVIEW
+POSTHOOK: Input: default@src
 POSTHOOK: Output: default@testview
 PREHOOK: query: DESCRIBE FORMATTED testView
 PREHOOK: type: DESCTABLE
@@ -79,12 +83,14 @@ WHERE key > 80 AND key < 100
 ORDER BY key, value
 LIMIT 10
 PREHOOK: type: CREATEVIEW
+PREHOOK: Input: default@src
 POSTHOOK: query: ALTER VIEW testView AS
 SELECT * FROM src
 WHERE key > 80 AND key < 100
 ORDER BY key, value
 LIMIT 10
 POSTHOOK: type: CREATEVIEW
+POSTHOOK: Input: default@src
 POSTHOOK: Output: default@testview
 PREHOOK: query: DESCRIBE FORMATTED testView
 PREHOOK: type: DESCTABLE

Modified: hive/trunk/ql/src/test/results/clientpositive/alter_view_rename.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/alter_view_rename.q.out?rev=1564472&r1=1564471&r2=1564472&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/alter_view_rename.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/alter_view_rename.q.out Tue Feb  4 20:34:39 2014
@@ -5,8 +5,10 @@ POSTHOOK: type: CREATETABLE
 POSTHOOK: Output: default@invites
 PREHOOK: query: CREATE VIEW view1 as SELECT * FROM invites
 PREHOOK: type: CREATEVIEW
+PREHOOK: Input: default@invites
 POSTHOOK: query: CREATE VIEW view1 as SELECT * FROM invites
 POSTHOOK: type: CREATEVIEW
+POSTHOOK: Input: default@invites
 POSTHOOK: Output: default@view1
 PREHOOK: query: DESCRIBE EXTENDED view1
 PREHOOK: type: DESCTABLE

Modified: hive/trunk/ql/src/test/results/clientpositive/authorization_8.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/authorization_8.q.out?rev=1564472&r1=1564471&r2=1564472&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/authorization_8.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/authorization_8.q.out Tue Feb  4 20:34:39 2014
@@ -9,8 +9,10 @@ POSTHOOK: type: CREATETABLE
 POSTHOOK: Output: default@tbl_j5jbymsx8e
 PREHOOK: query: CREATE VIEW view_j5jbymsx8e_1 as SELECT * FROM tbl_j5jbymsx8e
 PREHOOK: type: CREATEVIEW
+PREHOOK: Input: default@tbl_j5jbymsx8e
 POSTHOOK: query: CREATE VIEW view_j5jbymsx8e_1 as SELECT * FROM tbl_j5jbymsx8e
 POSTHOOK: type: CREATEVIEW
+POSTHOOK: Input: default@tbl_j5jbymsx8e
 POSTHOOK: Output: default@view_j5jbymsx8e_1
 PREHOOK: query: DESCRIBE view_j5jbymsx8e_1
 PREHOOK: type: DESCTABLE

Modified: hive/trunk/ql/src/test/results/clientpositive/authorization_view.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/authorization_view.q.out?rev=1564472&r1=1564471&r2=1564472&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/authorization_view.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/authorization_view.q.out Tue Feb  4 20:34:39 2014
@@ -2,10 +2,12 @@ PREHOOK: query: -- SORT_BEFORE_DIFF
 
 create view src_autho_test as select * from src
 PREHOOK: type: CREATEVIEW
+PREHOOK: Input: default@src
 POSTHOOK: query: -- SORT_BEFORE_DIFF
 
 create view src_autho_test as select * from src
 POSTHOOK: type: CREATEVIEW
+POSTHOOK: Input: default@src
 POSTHOOK: Output: default@src_autho_test
 PREHOOK: query: --view grant to user
 

Modified: hive/trunk/ql/src/test/results/clientpositive/create_big_view.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/create_big_view.q.out?rev=1564472&r1=1564471&r2=1564472&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/create_big_view.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/create_big_view.q.out Tue Feb  4 20:34:39 2014
@@ -242,6 +242,7 @@ CREATE VIEW big_view AS SELECT 
 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'
 FROM src
 PREHOOK: type: CREATEVIEW
+PREHOOK: Input: default@src
 POSTHOOK: query: -- Define a view with long SQL text to test metastore and other limits.
 
 CREATE VIEW big_view AS SELECT 
@@ -482,6 +483,7 @@ CREATE VIEW big_view AS SELECT 
 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'
 FROM src
 POSTHOOK: type: CREATEVIEW
+POSTHOOK: Input: default@src
 POSTHOOK: Output: default@big_view
 PREHOOK: query: SELECT a FROM big_view
 LIMIT 1

Modified: hive/trunk/ql/src/test/results/clientpositive/create_like_tbl_props.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/create_like_tbl_props.q.out?rev=1564472&r1=1564471&r2=1564472&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/create_like_tbl_props.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/create_like_tbl_props.q.out Tue Feb  4 20:34:39 2014
@@ -160,10 +160,12 @@ PREHOOK: query: --Test that CREATE TALBE
 
 CREATE VIEW test_view (key, value) AS SELECT * FROM src
 PREHOOK: type: CREATEVIEW
+PREHOOK: Input: default@src
 POSTHOOK: query: --Test that CREATE TALBE LIKE on a view can take explicit table properties
 
 CREATE VIEW test_view (key, value) AS SELECT * FROM src
 POSTHOOK: type: CREATEVIEW
+POSTHOOK: Input: default@src
 POSTHOOK: Output: default@test_view
 PREHOOK: query: CREATE TABLE test_table4 LIKE test_view TBLPROPERTIES('key'='value')
 PREHOOK: type: CREATETABLE

Modified: hive/trunk/ql/src/test/results/clientpositive/create_like_view.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/create_like_view.q.out?rev=1564472&r1=1564471&r2=1564472&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/create_like_view.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/create_like_view.q.out Tue Feb  4 20:34:39 2014
@@ -56,8 +56,10 @@ Storage Desc Params:	 	 
 	serialization.format	1                   
 PREHOOK: query: CREATE VIEW view1 AS SELECT * FROM table1
 PREHOOK: type: CREATEVIEW
+PREHOOK: Input: default@table1
 POSTHOOK: query: CREATE VIEW view1 AS SELECT * FROM table1
 POSTHOOK: type: CREATEVIEW
+POSTHOOK: Input: default@table1
 POSTHOOK: Output: default@view1
 PREHOOK: query: CREATE TABLE table2 LIKE view1
 PREHOOK: type: CREATETABLE
@@ -236,9 +238,11 @@ POSTHOOK: Lineage: table2.b SIMPLE [(src
 PREHOOK: query: -- check partitions
 create view view1 partitioned on (ds, hr) as select * from srcpart
 PREHOOK: type: CREATEVIEW
+PREHOOK: Input: default@srcpart
 POSTHOOK: query: -- check partitions
 create view view1 partitioned on (ds, hr) as select * from srcpart
 POSTHOOK: type: CREATEVIEW
+POSTHOOK: Input: default@srcpart
 POSTHOOK: Output: default@view1
 POSTHOOK: Lineage: table1.a SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
 POSTHOOK: Lineage: table1.b SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]

Modified: hive/trunk/ql/src/test/results/clientpositive/create_or_replace_view.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/create_or_replace_view.q.out?rev=1564472&r1=1564471&r2=1564472&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/create_or_replace_view.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/create_or_replace_view.q.out Tue Feb  4 20:34:39 2014
@@ -4,8 +4,10 @@ POSTHOOK: query: drop view v
 POSTHOOK: type: DROPVIEW
 PREHOOK: query: create view v as select * from srcpart
 PREHOOK: type: CREATEVIEW
+PREHOOK: Input: default@srcpart
 POSTHOOK: query: create view v as select * from srcpart
 POSTHOOK: type: CREATEVIEW
+POSTHOOK: Input: default@srcpart
 POSTHOOK: Output: default@v
 PREHOOK: query: describe formatted v
 PREHOOK: type: DESCTABLE
@@ -42,9 +44,11 @@ View Expanded Text: 	select `srcpart`.`k
 PREHOOK: query: -- modifying definition of unpartitioned view
 create or replace view v partitioned on (ds, hr) as select * from srcpart
 PREHOOK: type: CREATEVIEW
+PREHOOK: Input: default@srcpart
 POSTHOOK: query: -- modifying definition of unpartitioned view
 create or replace view v partitioned on (ds, hr) as select * from srcpart
 POSTHOOK: type: CREATEVIEW
+POSTHOOK: Input: default@srcpart
 POSTHOOK: Output: default@v
 PREHOOK: query: alter view v add partition (ds='2008-04-08',hr='11')
 PREHOOK: type: ALTERTABLE_ADDPARTS
@@ -128,9 +132,11 @@ ds=2008-04-08/hr=12
 PREHOOK: query: -- altering partitioned view 1
 create or replace view v partitioned on (ds, hr) as select value, ds, hr from srcpart
 PREHOOK: type: CREATEVIEW
+PREHOOK: Input: default@srcpart
 POSTHOOK: query: -- altering partitioned view 1
 create or replace view v partitioned on (ds, hr) as select value, ds, hr from srcpart
 POSTHOOK: type: CREATEVIEW
+POSTHOOK: Input: default@srcpart
 POSTHOOK: Output: default@v
 PREHOOK: query: select * from v where value='val_409' and ds='2008-04-08' and hr='11'
 PREHOOK: type: QUERY
@@ -191,9 +197,11 @@ ds=2008-04-08/hr=12
 PREHOOK: query: -- altering partitioned view 2
 create or replace view v partitioned on (ds, hr) as select key, value, ds, hr from srcpart
 PREHOOK: type: CREATEVIEW
+PREHOOK: Input: default@srcpart
 POSTHOOK: query: -- altering partitioned view 2
 create or replace view v partitioned on (ds, hr) as select key, value, ds, hr from srcpart
 POSTHOOK: type: CREATEVIEW
+POSTHOOK: Input: default@srcpart
 POSTHOOK: Output: default@v
 PREHOOK: query: select * from v where value='val_409' and ds='2008-04-08' and hr='11'
 PREHOOK: type: QUERY
@@ -269,8 +277,10 @@ POSTHOOK: type: CREATETABLE
 POSTHOOK: Output: default@srcpart_temp
 PREHOOK: query: create view v partitioned on (ds, hr) as select * from srcpart_temp
 PREHOOK: type: CREATEVIEW
+PREHOOK: Input: default@srcpart_temp
 POSTHOOK: query: create view v partitioned on (ds, hr) as select * from srcpart_temp
 POSTHOOK: type: CREATEVIEW
+POSTHOOK: Input: default@srcpart_temp
 POSTHOOK: Output: default@v
 PREHOOK: query: drop table srcpart_temp
 PREHOOK: type: DROPTABLE
@@ -283,9 +293,11 @@ POSTHOOK: Output: default@srcpart_temp
 PREHOOK: query: -- v is now invalid
 create or replace view v partitioned on (ds, hr) as select * from srcpart
 PREHOOK: type: CREATEVIEW
+PREHOOK: Input: default@srcpart
 POSTHOOK: query: -- v is now invalid
 create or replace view v partitioned on (ds, hr) as select * from srcpart
 POSTHOOK: type: CREATEVIEW
+POSTHOOK: Input: default@srcpart
 POSTHOOK: Output: default@v
 PREHOOK: query: describe formatted v
 PREHOOK: type: DESCTABLE

Modified: hive/trunk/ql/src/test/results/clientpositive/create_view.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/create_view.q.out?rev=1564472&r1=1564471&r2=1564472&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/create_view.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/create_view.q.out Tue Feb  4 20:34:39 2014
@@ -85,22 +85,28 @@ POSTHOOK: Input: default@src
 86	val_86
 PREHOOK: query: CREATE VIEW view1 AS SELECT value FROM src WHERE key=86
 PREHOOK: type: CREATEVIEW
+PREHOOK: Input: default@src
 POSTHOOK: query: CREATE VIEW view1 AS SELECT value FROM src WHERE key=86
 POSTHOOK: type: CREATEVIEW
+POSTHOOK: Input: default@src
 POSTHOOK: Output: default@view1
 PREHOOK: query: CREATE VIEW view2 AS SELECT * FROM src
 PREHOOK: type: CREATEVIEW
+PREHOOK: Input: default@src
 POSTHOOK: query: CREATE VIEW view2 AS SELECT * FROM src
 POSTHOOK: type: CREATEVIEW
+POSTHOOK: Input: default@src
 POSTHOOK: Output: default@view2
 PREHOOK: query: CREATE VIEW view3(valoo) 
 TBLPROPERTIES ("fear" = "factor")
 AS SELECT upper(value) FROM src WHERE key=86
 PREHOOK: type: CREATEVIEW
+PREHOOK: Input: default@src
 POSTHOOK: query: CREATE VIEW view3(valoo) 
 TBLPROPERTIES ("fear" = "factor")
 AS SELECT upper(value) FROM src WHERE key=86
 POSTHOOK: type: CREATEVIEW
+POSTHOOK: Input: default@src
 POSTHOOK: Output: default@view3
 PREHOOK: query: SELECT * from view1
 PREHOOK: type: QUERY
@@ -431,8 +437,10 @@ POSTHOOK: Lineage: table1.key EXPRESSION
 86
 PREHOOK: query: CREATE VIEW view4 AS SELECT * FROM table1
 PREHOOK: type: CREATEVIEW
+PREHOOK: Input: default@table1
 POSTHOOK: query: CREATE VIEW view4 AS SELECT * FROM table1
 POSTHOOK: type: CREATEVIEW
+POSTHOOK: Input: default@table1
 POSTHOOK: Output: default@view4
 POSTHOOK: Lineage: table1.key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ]
 PREHOOK: query: SELECT * FROM view4
@@ -500,10 +508,12 @@ key                 	int                
 PREHOOK: query: CREATE VIEW view5 AS SELECT v1.key as key1, v2.key as key2
 FROM view4 v1 join view4 v2
 PREHOOK: type: CREATEVIEW
+PREHOOK: Input: default@table1
 PREHOOK: Input: default@view4
 POSTHOOK: query: CREATE VIEW view5 AS SELECT v1.key as key1, v2.key as key2
 FROM view4 v1 join view4 v2
 POSTHOOK: type: CREATEVIEW
+POSTHOOK: Input: default@table1
 POSTHOOK: Input: default@view4
 POSTHOOK: Output: default@view5
 POSTHOOK: Lineage: table1.key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ]
@@ -533,11 +543,13 @@ PREHOOK: query: -- verify that column na
 CREATE VIEW view6(valoo COMMENT 'I cannot spell') AS
 SELECT upper(value) as blarg FROM src WHERE key=86
 PREHOOK: type: CREATEVIEW
+PREHOOK: Input: default@src
 POSTHOOK: query: -- verify that column name and comment in DDL portion
 -- overrides column alias in SELECT
 CREATE VIEW view6(valoo COMMENT 'I cannot spell') AS
 SELECT upper(value) as blarg FROM src WHERE key=86
 POSTHOOK: type: CREATEVIEW
+POSTHOOK: Input: default@src
 POSTHOOK: Output: default@view6
 POSTHOOK: Lineage: table1.key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ]
 PREHOOK: query: DESCRIBE view6
@@ -553,6 +565,7 @@ WHERE key > 80 AND key < 100
 ORDER BY key, value
 LIMIT 10
 PREHOOK: type: CREATEVIEW
+PREHOOK: Input: default@src
 POSTHOOK: query: -- verify that ORDER BY and LIMIT are both supported in view def
 CREATE VIEW view7 AS
 SELECT * FROM src
@@ -560,6 +573,7 @@ WHERE key > 80 AND key < 100
 ORDER BY key, value
 LIMIT 10
 POSTHOOK: type: CREATEVIEW
+POSTHOOK: Input: default@src
 POSTHOOK: Output: default@view7
 POSTHOOK: Lineage: table1.key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ]
 PREHOOK: query: SELECT * FROM view7
@@ -664,10 +678,12 @@ PREHOOK: query: CREATE VIEW view8(c) AS
 SELECT test_translate('abc', 'a', 'b')
 FROM table1
 PREHOOK: type: CREATEVIEW
+PREHOOK: Input: default@table1
 POSTHOOK: query: CREATE VIEW view8(c) AS
 SELECT test_translate('abc', 'a', 'b')
 FROM table1
 POSTHOOK: type: CREATEVIEW
+POSTHOOK: Input: default@table1
 POSTHOOK: Output: default@view8
 POSTHOOK: Lineage: table1.key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ]
 PREHOOK: query: DESCRIBE EXTENDED view8
@@ -738,11 +754,13 @@ CREATE VIEW view9(m) AS
 SELECT test_max(length(value))
 FROM src
 PREHOOK: type: CREATEVIEW
+PREHOOK: Input: default@src
 POSTHOOK: query: -- disable map-side aggregation
 CREATE VIEW view9(m) AS
 SELECT test_max(length(value))
 FROM src
 POSTHOOK: type: CREATEVIEW
+POSTHOOK: Input: default@src
 POSTHOOK: Output: default@view9
 POSTHOOK: Lineage: table1.key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ]
 PREHOOK: query: DESCRIBE EXTENDED view9
@@ -813,11 +831,13 @@ CREATE VIEW view9(m) AS
 SELECT test_max(length(value))
 FROM src
 PREHOOK: type: CREATEVIEW
+PREHOOK: Input: default@src
 POSTHOOK: query: -- enable map-side aggregation
 CREATE VIEW view9(m) AS
 SELECT test_max(length(value))
 FROM src
 POSTHOOK: type: CREATEVIEW
+POSTHOOK: Input: default@src
 POSTHOOK: Output: default@view9
 POSTHOOK: Lineage: table1.key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ]
 PREHOOK: query: DESCRIBE EXTENDED view9
@@ -878,10 +898,12 @@ PREHOOK: query: -- test usage of a subse
 CREATE VIEW view10 AS
 SELECT slurp.* FROM (SELECT * FROM src WHERE key=86) slurp
 PREHOOK: type: CREATEVIEW
+PREHOOK: Input: default@src
 POSTHOOK: query: -- test usage of a subselect within a view
 CREATE VIEW view10 AS
 SELECT slurp.* FROM (SELECT * FROM src WHERE key=86) slurp
 POSTHOOK: type: CREATEVIEW
+POSTHOOK: Input: default@src
 POSTHOOK: Output: default@view10
 POSTHOOK: Lineage: table1.key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ]
 PREHOOK: query: DESCRIBE EXTENDED view10
@@ -949,10 +971,12 @@ PREHOOK: query: CREATE VIEW view11 AS
 SELECT test_explode(array(1,2,3)) AS (boom)
 FROM table1
 PREHOOK: type: CREATEVIEW
+PREHOOK: Input: default@table1
 POSTHOOK: query: CREATE VIEW view11 AS
 SELECT test_explode(array(1,2,3)) AS (boom)
 FROM table1
 POSTHOOK: type: CREATEVIEW
+POSTHOOK: Input: default@table1
 POSTHOOK: Output: default@view11
 POSTHOOK: Lineage: table1.key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ]
 PREHOOK: query: DESCRIBE EXTENDED view11
@@ -1015,10 +1039,12 @@ PREHOOK: query: -- test usage of LATERAL
 CREATE VIEW view12 AS
 SELECT * FROM src LATERAL VIEW explode(array(1,2,3)) myTable AS myCol
 PREHOOK: type: CREATEVIEW
+PREHOOK: Input: default@src
 POSTHOOK: query: -- test usage of LATERAL within a view
 CREATE VIEW view12 AS
 SELECT * FROM src LATERAL VIEW explode(array(1,2,3)) myTable AS myCol
 POSTHOOK: type: CREATEVIEW
+POSTHOOK: Input: default@src
 POSTHOOK: Output: default@view12
 POSTHOOK: Lineage: table1.key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ]
 PREHOOK: query: DESCRIBE EXTENDED view12
@@ -1098,11 +1124,13 @@ CREATE VIEW view13 AS
 SELECT s.key
 FROM srcbucket TABLESAMPLE (BUCKET 1 OUT OF 5 ON key) s
 PREHOOK: type: CREATEVIEW
+PREHOOK: Input: default@srcbucket
 POSTHOOK: query: -- test usage of TABLESAMPLE within a view
 CREATE VIEW view13 AS
 SELECT s.key
 FROM srcbucket TABLESAMPLE (BUCKET 1 OUT OF 5 ON key) s
 POSTHOOK: type: CREATEVIEW
+POSTHOOK: Input: default@srcbucket
 POSTHOOK: Output: default@view13
 POSTHOOK: Lineage: table1.key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ]
 PREHOOK: query: DESCRIBE EXTENDED view13
@@ -1185,6 +1213,7 @@ JOIN
       select s4.key as key, s4.value as value from src s4 where s4.key < 10) unionsrc2
 ON (unionsrc1.key = unionsrc2.key)
 PREHOOK: type: CREATEVIEW
+PREHOOK: Input: default@src
 POSTHOOK: query: -- test usage of JOIN+UNION+AGG all within same view
 CREATE VIEW view14 AS
 SELECT unionsrc1.key as k1, unionsrc1.value as v1,
@@ -1198,6 +1227,7 @@ JOIN
       select s4.key as key, s4.value as value from src s4 where s4.key < 10) unionsrc2
 ON (unionsrc1.key = unionsrc2.key)
 POSTHOOK: type: CREATEVIEW
+POSTHOOK: Input: default@src
 POSTHOOK: Output: default@view14
 POSTHOOK: Lineage: table1.key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ]
 PREHOOK: query: DESCRIBE EXTENDED view14
@@ -1322,12 +1352,14 @@ SELECT key,COUNT(value) AS value_count
 FROM src
 GROUP BY key
 PREHOOK: type: CREATEVIEW
+PREHOOK: Input: default@src
 POSTHOOK: query: -- test usage of GROUP BY within view
 CREATE VIEW view15 AS
 SELECT key,COUNT(value) AS value_count
 FROM src
 GROUP BY key
 POSTHOOK: type: CREATEVIEW
+POSTHOOK: Input: default@src
 POSTHOOK: Output: default@view15
 POSTHOOK: Lineage: table1.key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ]
 PREHOOK: query: DESCRIBE EXTENDED view15
@@ -1408,11 +1440,13 @@ CREATE VIEW view16 AS
 SELECT DISTINCT value
 FROM src
 PREHOOK: type: CREATEVIEW
+PREHOOK: Input: default@src
 POSTHOOK: query: -- test usage of DISTINCT within view
 CREATE VIEW view16 AS
 SELECT DISTINCT value
 FROM src
 POSTHOOK: type: CREATEVIEW
+POSTHOOK: Input: default@src
 POSTHOOK: Output: default@view16
 POSTHOOK: Lineage: table1.key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ]
 PREHOOK: query: DESCRIBE EXTENDED view16

Modified: hive/trunk/ql/src/test/results/clientpositive/create_view_partitioned.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/create_view_partitioned.q.out?rev=1564472&r1=1564471&r2=1564472&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/create_view_partitioned.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/create_view_partitioned.q.out Tue Feb  4 20:34:39 2014
@@ -19,6 +19,7 @@ SELECT key, value
 FROM src
 WHERE key=86
 PREHOOK: type: CREATEVIEW
+PREHOOK: Input: default@src
 POSTHOOK: query: -- test partitioned view definition
 -- (underlying table is not actually partitioned)
 CREATE VIEW vp1
@@ -28,6 +29,7 @@ SELECT key, value
 FROM src
 WHERE key=86
 POSTHOOK: type: CREATEVIEW
+POSTHOOK: Input: default@src
 POSTHOOK: Output: default@vp1
 PREHOOK: query: DESCRIBE EXTENDED vp1
 PREHOOK: type: DESCTABLE
@@ -228,12 +230,14 @@ CREATE VIEW vp2
 PARTITIONED ON (hr)
 AS SELECT * FROM srcpart WHERE key < 10
 PREHOOK: type: CREATEVIEW
+PREHOOK: Input: default@srcpart
 POSTHOOK: query: -- test a partitioned view on top of an underlying partitioned table,
 -- but with only a suffix of the partitioning columns
 CREATE VIEW vp2
 PARTITIONED ON (hr)
 AS SELECT * FROM srcpart WHERE key < 10
 POSTHOOK: type: CREATEVIEW
+POSTHOOK: Input: default@srcpart
 POSTHOOK: Output: default@vp2
 PREHOOK: query: DESCRIBE FORMATTED vp2
 PREHOOK: type: DESCTABLE
@@ -332,6 +336,7 @@ SELECT key, value
 FROM src
 WHERE key=86
 PREHOOK: type: CREATEVIEW
+PREHOOK: Input: default@src
 POSTHOOK: query: -- test a partitioned view where the PARTITIONED ON clause references
 -- an imposed column name
 CREATE VIEW vp3(k,v)
@@ -341,6 +346,7 @@ SELECT key, value
 FROM src
 WHERE key=86
 POSTHOOK: type: CREATEVIEW
+POSTHOOK: Input: default@src
 POSTHOOK: Output: default@vp3
 PREHOOK: query: DESCRIBE FORMATTED vp3
 PREHOOK: type: DESCTABLE

Modified: hive/trunk/ql/src/test/results/clientpositive/create_view_translate.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/create_view_translate.q.out?rev=1564472&r1=1564471&r2=1564472&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/create_view_translate.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/create_view_translate.q.out Tue Feb  4 20:34:39 2014
@@ -8,8 +8,10 @@ POSTHOOK: query: drop view if exists w
 POSTHOOK: type: DROPVIEW
 PREHOOK: query: create view v as select cast(key as string) from src
 PREHOOK: type: CREATEVIEW
+PREHOOK: Input: default@src
 POSTHOOK: query: create view v as select cast(key as string) from src
 POSTHOOK: type: CREATEVIEW
+POSTHOOK: Input: default@src
 POSTHOOK: Output: default@v
 PREHOOK: query: describe formatted v
 PREHOOK: type: DESCTABLE
@@ -44,10 +46,12 @@ PREHOOK: query: create view w as select 
   select key, value from src
 ) a
 PREHOOK: type: CREATEVIEW
+PREHOOK: Input: default@src
 POSTHOOK: query: create view w as select key, value from (
   select key, value from src
 ) a
 POSTHOOK: type: CREATEVIEW
+POSTHOOK: Input: default@src
 POSTHOOK: Output: default@w
 PREHOOK: query: describe formatted w
 PREHOOK: type: DESCTABLE
@@ -129,8 +133,10 @@ STAGE PLANS:
 
 PREHOOK: query: CREATE VIEW priceview AS SELECT items.id, items.info['price'] FROM items
 PREHOOK: type: CREATEVIEW
+PREHOOK: Input: default@items
 POSTHOOK: query: CREATE VIEW priceview AS SELECT items.id, items.info['price'] FROM items
 POSTHOOK: type: CREATEVIEW
+POSTHOOK: Input: default@items
 POSTHOOK: Output: default@priceview
 PREHOOK: query: select * from priceview
 PREHOOK: type: QUERY

Modified: hive/trunk/ql/src/test/results/clientpositive/ctas_char.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/ctas_char.q.out?rev=1564472&r1=1564471&r2=1564472&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/ctas_char.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/ctas_char.q.out Tue Feb  4 20:34:39 2014
@@ -41,9 +41,11 @@ POSTHOOK: Lineage: ctas_char_1.value SIM
 PREHOOK: query: -- view with char column
 create view ctas_char_3 as select key, value from ctas_char_2
 PREHOOK: type: CREATEVIEW
+PREHOOK: Input: default@ctas_char_2
 POSTHOOK: query: -- view with char column
 create view ctas_char_3 as select key, value from ctas_char_2
 POSTHOOK: type: CREATEVIEW
+POSTHOOK: Input: default@ctas_char_2
 POSTHOOK: Output: default@ctas_char_3
 POSTHOOK: Lineage: ctas_char_1.key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ]
 POSTHOOK: Lineage: ctas_char_1.value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]

Modified: hive/trunk/ql/src/test/results/clientpositive/ctas_date.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/ctas_date.q.out?rev=1564472&r1=1564471&r2=1564472&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/ctas_date.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/ctas_date.q.out Tue Feb  4 20:34:39 2014
@@ -47,17 +47,21 @@ POSTHOOK: Lineage: ctas_date_1.value SIM
 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
+PREHOOK: Input: default@ctas_date_2
 POSTHOOK: query: -- view with date column
 create view ctas_date_3 as select * from ctas_date_2 where dd > date '2000-01-01'
 POSTHOOK: type: CREATEVIEW
+POSTHOOK: Input: default@ctas_date_2
 POSTHOOK: Output: default@ctas_date_3
 POSTHOOK: Lineage: ctas_date_1.dd SIMPLE []
 POSTHOOK: Lineage: ctas_date_1.key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ]
 POSTHOOK: Lineage: ctas_date_1.value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
 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
 POSTHOOK: query: create view ctas_date_4 as select * from ctas_date_2 where dd < date '2000-01-01'
 POSTHOOK: type: CREATEVIEW
+POSTHOOK: Input: default@ctas_date_2
 POSTHOOK: Output: default@ctas_date_4
 POSTHOOK: Lineage: ctas_date_1.dd SIMPLE []
 POSTHOOK: Lineage: ctas_date_1.key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ]

Modified: hive/trunk/ql/src/test/results/clientpositive/ctas_varchar.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/ctas_varchar.q.out?rev=1564472&r1=1564471&r2=1564472&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/ctas_varchar.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/ctas_varchar.q.out Tue Feb  4 20:34:39 2014
@@ -41,9 +41,11 @@ POSTHOOK: Lineage: ctas_varchar_1.value 
 PREHOOK: query: -- view with varchar column
 create view ctas_varchar_3 as select key, value from ctas_varchar_2
 PREHOOK: type: CREATEVIEW
+PREHOOK: Input: default@ctas_varchar_2
 POSTHOOK: query: -- view with varchar column
 create view ctas_varchar_3 as select key, value from ctas_varchar_2
 POSTHOOK: type: CREATEVIEW
+POSTHOOK: Input: default@ctas_varchar_2
 POSTHOOK: Output: default@ctas_varchar_3
 POSTHOOK: Lineage: ctas_varchar_1.key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ]
 POSTHOOK: Lineage: ctas_varchar_1.value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]

Modified: hive/trunk/ql/src/test/results/clientpositive/database_drop.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/database_drop.q.out?rev=1564472&r1=1564471&r2=1564472&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/database_drop.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/database_drop.q.out Tue Feb  4 20:34:39 2014
@@ -40,8 +40,10 @@ POSTHOOK: type: LOAD
 POSTHOOK: Output: db5@temp_tbl
 PREHOOK: query: CREATE VIEW temp_tbl_view AS SELECT * FROM temp_tbl
 PREHOOK: type: CREATEVIEW
+PREHOOK: Input: db5@temp_tbl
 POSTHOOK: query: CREATE VIEW temp_tbl_view AS SELECT * FROM temp_tbl
 POSTHOOK: type: CREATEVIEW
+POSTHOOK: Input: db5@temp_tbl
 POSTHOOK: Output: db5@temp_tbl_view
 PREHOOK: query: CREATE INDEX idx1 ON TABLE temp_tbl(id) AS 'COMPACT' with DEFERRED REBUILD
 PREHOOK: type: CREATEINDEX
@@ -80,8 +82,10 @@ POSTHOOK: Lineage: db5__temp_tbl_idx1__.
 POSTHOOK: Lineage: db5__temp_tbl_idx1__.id SIMPLE [(temp_tbl)temp_tbl.FieldSchema(name:id, type:int, comment:null), ]
 PREHOOK: query: CREATE VIEW temp_tbl2_view AS SELECT * FROM temp_tbl2
 PREHOOK: type: CREATEVIEW
+PREHOOK: Input: db5@temp_tbl2
 POSTHOOK: query: CREATE VIEW temp_tbl2_view AS SELECT * FROM temp_tbl2
 POSTHOOK: type: CREATEVIEW
+POSTHOOK: Input: db5@temp_tbl2
 POSTHOOK: Output: db5@temp_tbl2_view
 POSTHOOK: Lineage: db5__temp_tbl_idx1__._bucketname SIMPLE [(temp_tbl)temp_tbl.FieldSchema(name:INPUT__FILE__NAME, type:string, comment:), ]
 POSTHOOK: Lineage: db5__temp_tbl_idx1__._offsets EXPRESSION [(temp_tbl)temp_tbl.FieldSchema(name:BLOCK__OFFSET__INSIDE__FILE, type:bigint, comment:), ]

Modified: hive/trunk/ql/src/test/results/clientpositive/describe_formatted_view_partitioned.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/describe_formatted_view_partitioned.q.out?rev=1564472&r1=1564471&r2=1564472&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/describe_formatted_view_partitioned.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/describe_formatted_view_partitioned.q.out Tue Feb  4 20:34:39 2014
@@ -9,6 +9,7 @@ SELECT key, value
 FROM src
 WHERE key=86
 PREHOOK: type: CREATEVIEW
+PREHOOK: Input: default@src
 POSTHOOK: query: CREATE VIEW view_partitioned
 PARTITIONED ON (value)
 AS
@@ -16,6 +17,7 @@ SELECT key, value
 FROM src
 WHERE key=86
 POSTHOOK: type: CREATEVIEW
+POSTHOOK: Input: default@src
 POSTHOOK: Output: default@view_partitioned
 PREHOOK: query: ALTER VIEW view_partitioned
 ADD PARTITION (value='val_86')

Modified: hive/trunk/ql/src/test/results/clientpositive/describe_formatted_view_partitioned_json.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/describe_formatted_view_partitioned_json.q.out?rev=1564472&r1=1564471&r2=1564472&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/describe_formatted_view_partitioned_json.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/describe_formatted_view_partitioned_json.q.out Tue Feb  4 20:34:39 2014
@@ -9,6 +9,7 @@ SELECT key, value
 FROM src
 WHERE key=86
 PREHOOK: type: CREATEVIEW
+PREHOOK: Input: default@src
 POSTHOOK: query: CREATE VIEW view_partitioned
 PARTITIONED ON (value)
 AS
@@ -16,6 +17,7 @@ SELECT key, value
 FROM src
 WHERE key=86
 POSTHOOK: type: CREATEVIEW
+POSTHOOK: Input: default@src
 POSTHOOK: Output: default@view_partitioned
 PREHOOK: query: ALTER VIEW view_partitioned
 ADD PARTITION (value='val_86')

Modified: hive/trunk/ql/src/test/results/clientpositive/explain_dependency.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/explain_dependency.q.out?rev=1564472&r1=1564471&r2=1564472&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/explain_dependency.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/explain_dependency.q.out Tue Feb  4 20:34:39 2014
@@ -3,38 +3,50 @@ PREHOOK: query: -- This test is used for
 -- Create some views
 CREATE VIEW V1 AS SELECT key, value from src
 PREHOOK: type: CREATEVIEW
+PREHOOK: Input: default@src
 POSTHOOK: query: -- This test is used for testing EXPLAIN DEPENDENCY command
 
 -- Create some views
 CREATE VIEW V1 AS SELECT key, value from src
 POSTHOOK: type: CREATEVIEW
+POSTHOOK: Input: default@src
 POSTHOOK: Output: default@V1
 PREHOOK: query: CREATE VIEW V2 AS SELECT ds, key, value FROM srcpart WHERE ds IS NOT NULL
 PREHOOK: type: CREATEVIEW
+PREHOOK: Input: default@srcpart
 POSTHOOK: query: CREATE VIEW V2 AS SELECT ds, key, value FROM srcpart WHERE ds IS NOT NULL
 POSTHOOK: type: CREATEVIEW
+POSTHOOK: Input: default@srcpart
 POSTHOOK: Output: default@V2
 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
 PREHOOK: type: CREATEVIEW
+PREHOOK: Input: default@src
+PREHOOK: Input: default@srcpart
 PREHOOK: Input: default@v2
 POSTHOOK: 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
 POSTHOOK: type: CREATEVIEW
+POSTHOOK: Input: default@src
+POSTHOOK: Input: default@srcpart
 POSTHOOK: Input: default@v2
 POSTHOOK: Output: default@V3
 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
 PREHOOK: type: CREATEVIEW
+PREHOOK: Input: default@src
+PREHOOK: Input: default@srcpart
 PREHOOK: Input: default@v1
 PREHOOK: Input: default@v2
 POSTHOOK: 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
 POSTHOOK: type: CREATEVIEW
+POSTHOOK: Input: default@src
+POSTHOOK: Input: default@srcpart
 POSTHOOK: Input: default@v1
 POSTHOOK: Input: default@v2
 POSTHOOK: Output: default@V4
@@ -98,10 +110,12 @@ PREHOOK: query: -- The table should show
 -- of the partitions are selected.
 CREATE VIEW V5 as SELECT * FROM srcpart where ds = '10'
 PREHOOK: type: CREATEVIEW
+PREHOOK: Input: default@srcpart
 POSTHOOK: query: -- The table should show up in the explain dependency even if none
 -- of the partitions are selected.
 CREATE VIEW V5 as SELECT * FROM srcpart where ds = '10'
 POSTHOOK: type: CREATEVIEW
+POSTHOOK: Input: default@srcpart
 POSTHOOK: Output: default@V5
 PREHOOK: query: EXPLAIN DEPENDENCY SELECT * FROM V5
 PREHOOK: type: QUERY

Modified: hive/trunk/ql/src/test/results/clientpositive/explain_logical.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/explain_logical.q.out?rev=1564472&r1=1564471&r2=1564472&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/explain_logical.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/explain_logical.q.out Tue Feb  4 20:34:39 2014
@@ -3,38 +3,50 @@ PREHOOK: query: -- This test is used for
 -- Create some views
 CREATE VIEW V1 AS SELECT key, value from src
 PREHOOK: type: CREATEVIEW
+PREHOOK: Input: default@src
 POSTHOOK: query: -- This test is used for testing EXPLAIN LOGICAL command
 
 -- Create some views
 CREATE VIEW V1 AS SELECT key, value from src
 POSTHOOK: type: CREATEVIEW
+POSTHOOK: Input: default@src
 POSTHOOK: Output: default@V1
 PREHOOK: query: CREATE VIEW V2 AS SELECT ds, key, value FROM srcpart WHERE ds IS NOT NULL
 PREHOOK: type: CREATEVIEW
+PREHOOK: Input: default@srcpart
 POSTHOOK: query: CREATE VIEW V2 AS SELECT ds, key, value FROM srcpart WHERE ds IS NOT NULL
 POSTHOOK: type: CREATEVIEW
+POSTHOOK: Input: default@srcpart
 POSTHOOK: Output: default@V2
 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
 PREHOOK: type: CREATEVIEW
+PREHOOK: Input: default@src
+PREHOOK: Input: default@srcpart
 PREHOOK: Input: default@v2
 POSTHOOK: 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
 POSTHOOK: type: CREATEVIEW
+POSTHOOK: Input: default@src
+POSTHOOK: Input: default@srcpart
 POSTHOOK: Input: default@v2
 POSTHOOK: Output: default@V3
 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
 PREHOOK: type: CREATEVIEW
+PREHOOK: Input: default@src
+PREHOOK: Input: default@srcpart
 PREHOOK: Input: default@v1
 PREHOOK: Input: default@v2
 POSTHOOK: 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
 POSTHOOK: type: CREATEVIEW
+POSTHOOK: Input: default@src
+POSTHOOK: Input: default@srcpart
 POSTHOOK: Input: default@v1
 POSTHOOK: Input: default@v2
 POSTHOOK: Output: default@V4
@@ -647,10 +659,12 @@ PREHOOK: query: -- The table should show
 -- of the partitions are selected.
 CREATE VIEW V5 as SELECT * FROM srcpart where ds = '10'
 PREHOOK: type: CREATEVIEW
+PREHOOK: Input: default@srcpart
 POSTHOOK: query: -- The table should show up in the explain logical even if none
 -- of the partitions are selected.
 CREATE VIEW V5 as SELECT * FROM srcpart where ds = '10'
 POSTHOOK: type: CREATEVIEW
+POSTHOOK: Input: default@srcpart
 POSTHOOK: Output: default@V5
 PREHOOK: query: EXPLAIN LOGICAL SELECT * FROM V5
 PREHOOK: type: QUERY

Modified: hive/trunk/ql/src/test/results/clientpositive/join_view.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/join_view.q.out?rev=1564472&r1=1564471&r2=1564472&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/join_view.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/join_view.q.out Tue Feb  4 20:34:39 2014
@@ -20,10 +20,14 @@ PREHOOK: query: -- test join views: see 
 
 create view v as select invites.bar, invites2.foo, invites2.ds from invites join invites2 on invites.ds=invites2.ds
 PREHOOK: type: CREATEVIEW
+PREHOOK: Input: default@invites
+PREHOOK: Input: default@invites2
 POSTHOOK: query: -- test join views: see HIVE-1989
 
 create view v as select invites.bar, invites2.foo, invites2.ds from invites join invites2 on invites.ds=invites2.ds
 POSTHOOK: type: CREATEVIEW
+POSTHOOK: Input: default@invites
+POSTHOOK: Input: default@invites2
 POSTHOOK: Output: default@v
 PREHOOK: query: explain select * from v where ds='2011-09-01'
 PREHOOK: type: QUERY

Modified: hive/trunk/ql/src/test/results/clientpositive/lateral_view_noalias.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/lateral_view_noalias.q.out?rev=1564472&r1=1564471&r2=1564472&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/lateral_view_noalias.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/lateral_view_noalias.q.out Tue Feb  4 20:34:39 2014
@@ -125,9 +125,11 @@ key2	200
 PREHOOK: query: -- view
 create view lv_noalias as SELECT myTab.* from src LATERAL VIEW explode(map('key1', 100, 'key2', 200)) myTab limit 2
 PREHOOK: type: CREATEVIEW
+PREHOOK: Input: default@src
 POSTHOOK: query: -- view
 create view lv_noalias as SELECT myTab.* from src LATERAL VIEW explode(map('key1', 100, 'key2', 200)) myTab limit 2
 POSTHOOK: type: CREATEVIEW
+POSTHOOK: Input: default@src
 POSTHOOK: Output: default@lv_noalias
 PREHOOK: query: explain select * from lv_noalias a join lv_noalias b on a.key=b.key
 PREHOOK: type: QUERY

Modified: hive/trunk/ql/src/test/results/clientpositive/ppd_union_view.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/ppd_union_view.q.out?rev=1564472&r1=1564471&r2=1564472&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/ppd_union_view.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/ppd_union_view.q.out Tue Feb  4 20:34:39 2014
@@ -145,6 +145,9 @@ on t1_old.keymap = t1_mapping.keymap and
    t1_old.ds = t1_mapping.ds
 ) subq
 PREHOOK: type: CREATEVIEW
+PREHOOK: Input: default@t1_mapping
+PREHOOK: Input: default@t1_new
+PREHOOK: Input: default@t1_old
 POSTHOOK: query: create view t1 partitioned on (ds) as
 select * from
 (
@@ -155,6 +158,9 @@ on t1_old.keymap = t1_mapping.keymap and
    t1_old.ds = t1_mapping.ds
 ) subq
 POSTHOOK: type: CREATEVIEW
+POSTHOOK: Input: default@t1_mapping
+POSTHOOK: Input: default@t1_new
+POSTHOOK: Input: default@t1_old
 POSTHOOK: Output: default@t1
 POSTHOOK: Lineage: t1_mapping PARTITION(ds=2011-10-13).key SIMPLE []
 POSTHOOK: Lineage: t1_mapping PARTITION(ds=2011-10-13).keymap SIMPLE []

Modified: hive/trunk/ql/src/test/results/clientpositive/ptf.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/ptf.q.out?rev=1564472&r1=1564471&r2=1564472&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/ptf.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/ptf.q.out Tue Feb  4 20:34:39 2014
@@ -766,6 +766,7 @@ sum(p_retailprice) as s 
 from part 
 group by p_mfgr, p_brand
 PREHOOK: type: CREATEVIEW
+PREHOOK: Input: default@part
 POSTHOOK: query: -- 16. testViewAsTableInputToPTF
 create view IF NOT EXISTS mfgr_price_view as 
 select p_mfgr, p_brand, 
@@ -773,6 +774,7 @@ sum(p_retailprice) as s 
 from part 
 group by p_mfgr, p_brand
 POSTHOOK: type: CREATEVIEW
+POSTHOOK: Input: default@part
 POSTHOOK: Output: default@mfgr_price_view
 PREHOOK: query: select p_mfgr, p_brand, s, 
 sum(s) over w1  as s1

Modified: hive/trunk/ql/src/test/results/clientpositive/quotedid_basic.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/quotedid_basic.q.out?rev=1564472&r1=1564471&r2=1564472&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/quotedid_basic.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/quotedid_basic.q.out Tue Feb  4 20:34:39 2014
@@ -340,11 +340,13 @@ create view v1 as 
 select `x+1```, `y&y`
 from t4 where `x+1``` < '200'
 PREHOOK: type: CREATEVIEW
+PREHOOK: Input: default@t4
 POSTHOOK: query: -- view
 create view v1 as 
 select `x+1```, `y&y`
 from t4 where `x+1``` < '200'
 POSTHOOK: type: CREATEVIEW
+POSTHOOK: Input: default@t4
 POSTHOOK: Output: default@v1
 POSTHOOK: Lineage: t4.x+1` SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
 POSTHOOK: Lineage: t4.y&y SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]

Modified: hive/trunk/ql/src/test/results/clientpositive/show_create_table_view.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/show_create_table_view.q.out?rev=1564472&r1=1564471&r2=1564472&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/show_create_table_view.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/show_create_table_view.q.out Tue Feb  4 20:34:39 2014
@@ -2,10 +2,12 @@ PREHOOK: query: -- Test SHOW CREATE TABL
 
 CREATE VIEW tmp_copy_src AS SELECT * FROM src
 PREHOOK: type: CREATEVIEW
+PREHOOK: Input: default@src
 POSTHOOK: query: -- Test SHOW CREATE TABLE on a view name.
 
 CREATE VIEW tmp_copy_src AS SELECT * FROM src
 POSTHOOK: type: CREATEVIEW
+POSTHOOK: Input: default@src
 POSTHOOK: Output: default@tmp_copy_src
 PREHOOK: query: SHOW CREATE TABLE tmp_copy_src
 PREHOOK: type: SHOW_CREATETABLE



Mime
View raw message