FAQ
Author: namit
Date: Fri Feb 3 06:17:36 2012
New Revision: 1240005

URL: http://svn.apache.org/viewvc?rev=1240005&view=rev
Log:
HIVE-2756 Views should be added to the inputs of queries.
(Yongqiang He via namit)


Modified:
hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java
hive/trunk/ql/src/test/results/clientnegative/create_or_replace_view7.q.out
hive/trunk/ql/src/test/results/clientnegative/invalidate_view1.q.out
hive/trunk/ql/src/test/results/clientnegative/recursive_view.q.out
hive/trunk/ql/src/test/results/clientpositive/alter_view_rename.q.out
hive/trunk/ql/src/test/results/clientpositive/create_big_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/ppd_union_view.q.out

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=1240005&r1=1240004&r2=1240005&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 Fri Feb 3 06:17:36 2012
@@ -27,9 +27,9 @@ import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
-import java.util.Map.Entry;
import java.util.Set;
import java.util.TreeSet;
+import java.util.Map.Entry;
import java.util.regex.Pattern;
import java.util.regex.PatternSyntaxException;

@@ -96,7 +96,6 @@ import org.apache.hadoop.hive.ql.metadat
import org.apache.hadoop.hive.ql.optimizer.GenMRFileSink1;
import org.apache.hadoop.hive.ql.optimizer.GenMROperator;
import org.apache.hadoop.hive.ql.optimizer.GenMRProcContext;
-import org.apache.hadoop.hive.ql.optimizer.GenMRProcContext.GenMapRedCtx;
import org.apache.hadoop.hive.ql.optimizer.GenMRRedSink1;
import org.apache.hadoop.hive.ql.optimizer.GenMRRedSink2;
import org.apache.hadoop.hive.ql.optimizer.GenMRRedSink3;
@@ -106,6 +105,7 @@ import org.apache.hadoop.hive.ql.optimiz
import org.apache.hadoop.hive.ql.optimizer.GenMapRedUtils;
import org.apache.hadoop.hive.ql.optimizer.MapJoinFactory;
import org.apache.hadoop.hive.ql.optimizer.Optimizer;
+import org.apache.hadoop.hive.ql.optimizer.GenMRProcContext.GenMapRedCtx;
import org.apache.hadoop.hive.ql.optimizer.physical.PhysicalContext;
import org.apache.hadoop.hive.ql.optimizer.physical.PhysicalOptimizer;
import org.apache.hadoop.hive.ql.optimizer.ppr.PartitionPruner;
@@ -126,7 +126,6 @@ import org.apache.hadoop.hive.ql.plan.Ex
import org.apache.hadoop.hive.ql.plan.FetchWork;
import org.apache.hadoop.hive.ql.plan.FileSinkDesc;
import org.apache.hadoop.hive.ql.plan.FilterDesc;
-import org.apache.hadoop.hive.ql.plan.FilterDesc.sampleDesc;
import org.apache.hadoop.hive.ql.plan.ForwardDesc;
import org.apache.hadoop.hive.ql.plan.GroupByDesc;
import org.apache.hadoop.hive.ql.plan.HiveOperation;
@@ -149,13 +148,14 @@ import org.apache.hadoop.hive.ql.plan.Ta
import org.apache.hadoop.hive.ql.plan.TableScanDesc;
import org.apache.hadoop.hive.ql.plan.UDTFDesc;
import org.apache.hadoop.hive.ql.plan.UnionDesc;
+import org.apache.hadoop.hive.ql.plan.FilterDesc.sampleDesc;
import org.apache.hadoop.hive.ql.session.SessionState;
import org.apache.hadoop.hive.ql.session.SessionState.ResourceType;
import org.apache.hadoop.hive.ql.udf.generic.GenericUDAFEvaluator;
-import org.apache.hadoop.hive.ql.udf.generic.GenericUDAFEvaluator.Mode;
import org.apache.hadoop.hive.ql.udf.generic.GenericUDFHash;
import org.apache.hadoop.hive.ql.udf.generic.GenericUDFOPOr;
import org.apache.hadoop.hive.ql.udf.generic.GenericUDTF;
+import org.apache.hadoop.hive.ql.udf.generic.GenericUDAFEvaluator.Mode;
import org.apache.hadoop.hive.serde.Constants;
import org.apache.hadoop.hive.serde2.Deserializer;
import org.apache.hadoop.hive.serde2.MetadataTypedColumnsetSerDe;
@@ -163,9 +163,9 @@ import org.apache.hadoop.hive.serde2.Ser
import org.apache.hadoop.hive.serde2.SerDeUtils;
import org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe;
import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector;
-import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector.Category;
import org.apache.hadoop.hive.serde2.objectinspector.StructField;
import org.apache.hadoop.hive.serde2.objectinspector.StructObjectInspector;
+import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector.Category;
import org.apache.hadoop.hive.serde2.objectinspector.primitive.PrimitiveObjectInspectorUtils;
import org.apache.hadoop.hive.serde2.objectinspector.primitive.PrimitiveObjectInspectorUtils.PrimitiveTypeEntry;
import org.apache.hadoop.hive.serde2.typeinfo.TypeInfo;
@@ -993,6 +993,9 @@ public class SemanticAnalyzer extends Ba
}
replaceViewReferenceWithDefinition(qb, tab, tab_name, alias);
aliasToViewName.put(alias, fullViewName);
+ // This is the last time we'll see the Table objects for views, so add it to the inputs
+ // now
+ inputs.add(new ReadEntity(tab));
continue;
}

@@ -6994,7 +6997,7 @@ public class SemanticAnalyzer extends Ba
} else if ( (fetch.getPartDesc() != null) && (!fetch.getPartDesc().isEmpty())){
PartitionDesc pd0 = fetch.getPartDesc().get(0);
TableDesc td = pd0.getTableDesc();
- if ((td != null)&&(td.getProperties() != null)
+ if ((td != null)&&(td.getProperties() != null)
&& td.getProperties().containsKey(
org.apache.hadoop.hive.metastore.api.Constants.META_TABLE_STORAGE)){
PlanUtils.configureTableJobPropertiesForStorageHandler(td);

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=1240005&r1=1240004&r2=1240005&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 Fri Feb 3 06:17:36 2012
@@ -15,16 +15,22 @@ POSTHOOK: Output: default@v1
#### A masked pattern was here ####
PREHOOK: query: create view v2 partitioned on (ds, hr) as select * from v1
PREHOOK: type: CREATEVIEW
+PREHOOK: Input: default@v1
#### A masked pattern was here ####
POSTHOOK: query: create view v2 partitioned on (ds, hr) as select * from v1
POSTHOOK: type: CREATEVIEW
+POSTHOOK: Input: default@v1
POSTHOOK: Output: default@v2
#### A masked pattern was here ####
PREHOOK: query: create view v3 partitioned on (ds, hr) as select * from v2
PREHOOK: type: CREATEVIEW
+PREHOOK: Input: default@v1
+PREHOOK: Input: default@v2
#### A masked pattern was here ####
POSTHOOK: query: create view v3 partitioned on (ds, hr) as select * from v2
POSTHOOK: type: CREATEVIEW
+POSTHOOK: Input: default@v1
+POSTHOOK: Input: default@v2
POSTHOOK: Output: default@v3
#### A masked pattern was here ####
FAILED: Error in semantic analysis: Recursive view default.v1 detected (cycle: default.v1 -> default.v3 -> default.v2 -> default.v1).

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=1240005&r1=1240004&r2=1240005&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 Fri Feb 3 06:17:36 2012
@@ -26,9 +26,11 @@ POSTHOOK: Output: default@xxx9
#### A masked pattern was here ####
PREHOOK: query: CREATE VIEW xxx8 AS SELECT * FROM xxx9 xxx
PREHOOK: type: CREATEVIEW
+PREHOOK: Input: default@xxx9
#### A masked pattern was here ####
POSTHOOK: query: CREATE VIEW xxx8 AS SELECT * FROM xxx9 xxx
POSTHOOK: type: CREATEVIEW
+POSTHOOK: Input: default@xxx9
POSTHOOK: Output: default@xxx8
#### A masked pattern was here ####
PREHOOK: query: ALTER TABLE xxx10 REPLACE COLUMNS (key int)

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=1240005&r1=1240004&r2=1240005&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 Fri Feb 3 06:17:36 2012
@@ -36,23 +36,35 @@ POSTHOOK: Output: default@r0
#### A masked pattern was here ####
PREHOOK: query: create view r1 as select * from r0
PREHOOK: type: CREATEVIEW
+PREHOOK: Input: default@r0
#### A masked pattern was here ####
POSTHOOK: query: create view r1 as select * from r0
POSTHOOK: type: CREATEVIEW
+POSTHOOK: Input: default@r0
POSTHOOK: Output: default@r1
#### A masked pattern was here ####
PREHOOK: query: create view r2 as select * from r1
PREHOOK: type: CREATEVIEW
+PREHOOK: Input: default@r0
+PREHOOK: Input: default@r1
#### A masked pattern was here ####
POSTHOOK: query: create view r2 as select * from r1
POSTHOOK: type: CREATEVIEW
+POSTHOOK: Input: default@r0
+POSTHOOK: Input: default@r1
POSTHOOK: Output: default@r2
#### A masked pattern was here ####
PREHOOK: query: create view r3 as select * from r2
PREHOOK: type: CREATEVIEW
+PREHOOK: Input: default@r0
+PREHOOK: Input: default@r1
+PREHOOK: Input: default@r2
#### A masked pattern was here ####
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: Output: default@r3
#### A masked pattern was here ####
PREHOOK: query: drop view r0

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=1240005&r1=1240004&r2=1240005&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 Fri Feb 3 06:17:36 2012
@@ -39,9 +39,11 @@ ds string
#### A masked pattern was here ####
PREHOOK: query: SELECT * FROM view2
PREHOOK: type: QUERY
+PREHOOK: Input: default@view2
#### A masked pattern was here ####
POSTHOOK: query: SELECT * FROM view2
POSTHOOK: type: QUERY
+POSTHOOK: Input: default@view2
#### A masked pattern was here ####
PREHOOK: query: DROP TABLE invites
PREHOOK: type: DROPTABLE

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=1240005&r1=1240004&r2=1240005&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 Fri Feb 3 06:17:36 2012
@@ -488,11 +488,13 @@ POSTHOOK: Output: default@big_view
PREHOOK: query: SELECT a FROM big_view
LIMIT 1
PREHOOK: type: QUERY
+PREHOOK: Input: default@big_view
PREHOOK: Input: default@src
#### A masked pattern was here ####
POSTHOOK: query: SELECT a FROM big_view
LIMIT 1
POSTHOOK: type: QUERY
+POSTHOOK: Input: default@big_view
POSTHOOK: Input: default@src
#### A masked pattern was here ####
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa

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=1240005&r1=1240004&r2=1240005&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 Fri Feb 3 06:17:36 2012
@@ -71,10 +71,12 @@ POSTHOOK: Output: default@v@ds=2008-04-0
PREHOOK: query: select * from v where value='val_409' and ds='2008-04-08' and hr='11'
PREHOOK: type: QUERY
PREHOOK: Input: default@srcpart@ds=2008-04-08/hr=11
+PREHOOK: Input: default@v
#### A masked pattern was here ####
POSTHOOK: query: select * from v where value='val_409' and ds='2008-04-08' and hr='11'
POSTHOOK: type: QUERY
POSTHOOK: Input: default@srcpart@ds=2008-04-08/hr=11
+POSTHOOK: Input: default@v
#### A masked pattern was here ####
409 val_409 2008-04-08 11
409 val_409 2008-04-08 11
@@ -133,10 +135,12 @@ POSTHOOK: Output: default@v
PREHOOK: query: select * from v where value='val_409' and ds='2008-04-08' and hr='11'
PREHOOK: type: QUERY
PREHOOK: Input: default@srcpart@ds=2008-04-08/hr=11
+PREHOOK: Input: default@v
#### A masked pattern was here ####
POSTHOOK: query: select * from v where value='val_409' and ds='2008-04-08' and hr='11'
POSTHOOK: type: QUERY
POSTHOOK: Input: default@srcpart@ds=2008-04-08/hr=11
+POSTHOOK: Input: default@v
#### A masked pattern was here ####
val_409 2008-04-08 11
val_409 2008-04-08 11
@@ -194,10 +198,12 @@ POSTHOOK: Output: default@v
PREHOOK: query: select * from v where value='val_409' and ds='2008-04-08' and hr='11'
PREHOOK: type: QUERY
PREHOOK: Input: default@srcpart@ds=2008-04-08/hr=11
+PREHOOK: Input: default@v
#### A masked pattern was here ####
POSTHOOK: query: select * from v where value='val_409' and ds='2008-04-08' and hr='11'
POSTHOOK: type: QUERY
POSTHOOK: Input: default@srcpart@ds=2008-04-08/hr=11
+POSTHOOK: Input: default@v
#### A masked pattern was here ####
409 val_409 2008-04-08 11
409 val_409 2008-04-08 11

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=1240005&r1=1240004&r2=1240005&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 Fri Feb 3 06:17:36 2012
@@ -111,29 +111,35 @@ POSTHOOK: Output: default@view3
PREHOOK: query: SELECT * from view1
PREHOOK: type: QUERY
PREHOOK: Input: default@src
+PREHOOK: Input: default@view1
#### A masked pattern was here ####
POSTHOOK: query: SELECT * from view1
POSTHOOK: type: QUERY
POSTHOOK: Input: default@src
+POSTHOOK: Input: default@view1
#### A masked pattern was here ####
val_86
PREHOOK: query: SELECT * from view2 where key=18
PREHOOK: type: QUERY
PREHOOK: Input: default@src
+PREHOOK: Input: default@view2
#### A masked pattern was here ####
POSTHOOK: query: SELECT * from view2 where key=18
POSTHOOK: type: QUERY
POSTHOOK: Input: default@src
+POSTHOOK: Input: default@view2
#### A masked pattern was here ####
18 val_18
18 val_18
PREHOOK: query: SELECT * from view3
PREHOOK: type: QUERY
PREHOOK: Input: default@src
+PREHOOK: Input: default@view3
#### A masked pattern was here ####
POSTHOOK: query: SELECT * from view3
POSTHOOK: type: QUERY
POSTHOOK: Input: default@src
+POSTHOOK: Input: default@view3
#### A masked pattern was here ####
VAL_86
PREHOOK: query: -- test EXPLAIN output for CREATE VIEW
@@ -459,10 +465,12 @@ POSTHOOK: Lineage: table1.key EXPRESSION
PREHOOK: query: SELECT * FROM view4
PREHOOK: type: QUERY
PREHOOK: Input: default@table1
+PREHOOK: Input: default@view4
#### A masked pattern was here ####
POSTHOOK: query: SELECT * FROM view4
POSTHOOK: type: QUERY
POSTHOOK: Input: default@table1
+POSTHOOK: Input: default@view4
#### A masked pattern was here ####
POSTHOOK: Lineage: table1.key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ]
86
@@ -494,10 +502,12 @@ POSTHOOK: Lineage: table1.key EXPRESSION
PREHOOK: query: SELECT * FROM view4
PREHOOK: type: QUERY
PREHOOK: Input: default@table1
+PREHOOK: Input: default@view4
#### A masked pattern was here ####
POSTHOOK: query: SELECT * FROM view4
POSTHOOK: type: QUERY
POSTHOOK: Input: default@table1
+POSTHOOK: Input: default@view4
#### A masked pattern was here ####
POSTHOOK: Lineage: table1.key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ]
86
@@ -517,20 +527,26 @@ 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@view4
#### A masked pattern was here ####
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@view4
POSTHOOK: Output: default@view5
#### A masked pattern was here ####
POSTHOOK: Lineage: table1.key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ]
PREHOOK: query: SELECT * FROM view5
PREHOOK: type: QUERY
PREHOOK: Input: default@table1
+PREHOOK: Input: default@view4
+PREHOOK: Input: default@view5
#### A masked pattern was here ####
POSTHOOK: query: SELECT * FROM view5
POSTHOOK: type: QUERY
POSTHOOK: Input: default@table1
+POSTHOOK: Input: default@view4
+POSTHOOK: Input: default@view5
#### A masked pattern was here ####
POSTHOOK: Lineage: table1.key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ]
86 86
@@ -582,10 +598,12 @@ POSTHOOK: Lineage: table1.key EXPRESSION
PREHOOK: query: SELECT * FROM view7
PREHOOK: type: QUERY
PREHOOK: Input: default@src
+PREHOOK: Input: default@view7
#### A masked pattern was here ####
POSTHOOK: query: SELECT * FROM view7
POSTHOOK: type: QUERY
POSTHOOK: Input: default@src
+POSTHOOK: Input: default@view7
#### A masked pattern was here ####
POSTHOOK: Lineage: table1.key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ]
82 val_82
@@ -604,6 +622,7 @@ PREHOOK: query: -- top-level ORDER BY sh
SELECT * FROM view7 ORDER BY key DESC, value
PREHOOK: type: QUERY
PREHOOK: Input: default@src
+PREHOOK: Input: default@view7
#### A masked pattern was here ####
POSTHOOK: query: -- top-level ORDER BY should override the one inside the view
-- (however, the inside ORDER BY should still influence the evaluation
@@ -611,6 +630,7 @@ POSTHOOK: query: -- top-level ORDER BY s
SELECT * FROM view7 ORDER BY key DESC, value
POSTHOOK: type: QUERY
POSTHOOK: Input: default@src
+POSTHOOK: Input: default@view7
#### A masked pattern was here ####
POSTHOOK: Lineage: table1.key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ]
90 val_90
@@ -627,11 +647,13 @@ PREHOOK: query: -- top-level LIMIT shoul
SELECT * FROM view7 LIMIT 5
PREHOOK: type: QUERY
PREHOOK: Input: default@src
+PREHOOK: Input: default@view7
#### A masked pattern was here ####
POSTHOOK: query: -- top-level LIMIT should override if lower
SELECT * FROM view7 LIMIT 5
POSTHOOK: type: QUERY
POSTHOOK: Input: default@src
+POSTHOOK: Input: default@view7
#### A masked pattern was here ####
POSTHOOK: Lineage: table1.key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ]
82 val_82
@@ -643,11 +665,13 @@ PREHOOK: query: -- but not if higher
SELECT * FROM view7 LIMIT 20
PREHOOK: type: QUERY
PREHOOK: Input: default@src
+PREHOOK: Input: default@view7
#### A masked pattern was here ####
POSTHOOK: query: -- but not if higher
SELECT * FROM view7 LIMIT 20
POSTHOOK: type: QUERY
POSTHOOK: Input: default@src
+POSTHOOK: Input: default@view7
#### A masked pattern was here ####
POSTHOOK: Lineage: table1.key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ]
82 val_82
@@ -726,10 +750,12 @@ FROM `table1`) `view8`
PREHOOK: query: SELECT * FROM view8
PREHOOK: type: QUERY
PREHOOK: Input: default@table1
+PREHOOK: Input: default@view8
#### A masked pattern was here ####
POSTHOOK: query: SELECT * FROM view8
POSTHOOK: type: QUERY
POSTHOOK: Input: default@table1
+POSTHOOK: Input: default@view8
#### A masked pattern was here ####
POSTHOOK: Lineage: table1.key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ]
bbc
@@ -799,10 +825,12 @@ FROM `src`) `view9`
PREHOOK: query: SELECT * FROM view9
PREHOOK: type: QUERY
PREHOOK: Input: default@src
+PREHOOK: Input: default@view9
#### A masked pattern was here ####
POSTHOOK: query: SELECT * FROM view9
POSTHOOK: type: QUERY
POSTHOOK: Input: default@src
+POSTHOOK: Input: default@view9
#### A masked pattern was here ####
POSTHOOK: Lineage: table1.key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ]
7
@@ -861,10 +889,12 @@ View Expanded Text: SELECT `slurp`.`key
PREHOOK: query: SELECT * FROM view10
PREHOOK: type: QUERY
PREHOOK: Input: default@src
+PREHOOK: Input: default@view10
#### A masked pattern was here ####
POSTHOOK: query: SELECT * FROM view10
POSTHOOK: type: QUERY
POSTHOOK: Input: default@src
+POSTHOOK: Input: default@view10
#### A masked pattern was here ####
POSTHOOK: Lineage: table1.key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ]
86 val_86
@@ -934,10 +964,12 @@ FROM `table1`
PREHOOK: query: SELECT * FROM view11
PREHOOK: type: QUERY
PREHOOK: Input: default@table1
+PREHOOK: Input: default@view11
#### A masked pattern was here ####
POSTHOOK: query: SELECT * FROM view11
POSTHOOK: type: QUERY
POSTHOOK: Input: default@table1
+POSTHOOK: Input: default@view11
#### A masked pattern was here ####
POSTHOOK: Lineage: table1.key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ]
1
@@ -1001,11 +1033,13 @@ PREHOOK: query: SELECT * FROM view12
ORDER BY key ASC, myCol ASC LIMIT 1
PREHOOK: type: QUERY
PREHOOK: Input: default@src
+PREHOOK: Input: default@view12
#### A masked pattern was here ####
POSTHOOK: query: SELECT * FROM view12
ORDER BY key ASC, myCol ASC LIMIT 1
POSTHOOK: type: QUERY
POSTHOOK: Input: default@src
+POSTHOOK: Input: default@view12
#### A masked pattern was here ####
POSTHOOK: Lineage: table1.key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ]
0 val_0 1
@@ -1014,12 +1048,14 @@ SELECT * FROM view2 LATERAL VIEW explode
ORDER BY key ASC, myCol ASC LIMIT 1
PREHOOK: type: QUERY
PREHOOK: Input: default@src
+PREHOOK: Input: default@view2
#### A masked pattern was here ####
POSTHOOK: query: -- test usage of LATERAL with a view as the LHS
SELECT * FROM view2 LATERAL VIEW explode(array(1,2,3)) myTable AS myCol
ORDER BY key ASC, myCol ASC LIMIT 1
POSTHOOK: type: QUERY
POSTHOOK: Input: default@src
+POSTHOOK: Input: default@view2
#### A masked pattern was here ####
POSTHOOK: Lineage: table1.key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ]
0 val_0 1
@@ -1083,11 +1119,13 @@ PREHOOK: query: SELECT * FROM view13
ORDER BY key LIMIT 12
PREHOOK: type: QUERY
PREHOOK: Input: default@srcbucket
+PREHOOK: Input: default@view13
#### A masked pattern was here ####
POSTHOOK: query: SELECT * FROM view13
ORDER BY key LIMIT 12
POSTHOOK: type: QUERY
POSTHOOK: Input: default@srcbucket
+POSTHOOK: Input: default@view13
#### A masked pattern was here ####
POSTHOOK: Lineage: table1.key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ]

@@ -1216,11 +1254,13 @@ PREHOOK: query: SELECT * FROM view14
ORDER BY k1
PREHOOK: type: QUERY
PREHOOK: Input: default@src
+PREHOOK: Input: default@view14
#### A masked pattern was here ####
POSTHOOK: query: SELECT * FROM view14
ORDER BY k1
POSTHOOK: type: QUERY
POSTHOOK: Input: default@src
+POSTHOOK: Input: default@view14
#### A masked pattern was here ####
POSTHOOK: Lineage: table1.key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ]
0 val_0 0 val_0
@@ -1315,12 +1355,14 @@ ORDER BY value_count DESC, key
LIMIT 10
PREHOOK: type: QUERY
PREHOOK: Input: default@src
+PREHOOK: Input: default@view15
#### A masked pattern was here ####
POSTHOOK: query: SELECT * FROM view15
ORDER BY value_count DESC, key
LIMIT 10
POSTHOOK: type: QUERY
POSTHOOK: Input: default@src
+POSTHOOK: Input: default@view15
#### A masked pattern was here ####
POSTHOOK: Lineage: table1.key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ]
230 5
@@ -1394,12 +1436,14 @@ ORDER BY value
LIMIT 10
PREHOOK: type: QUERY
PREHOOK: Input: default@src
+PREHOOK: Input: default@view16
#### A masked pattern was here ####
POSTHOOK: query: SELECT * FROM view16
ORDER BY value
LIMIT 10
POSTHOOK: type: QUERY
POSTHOOK: Input: default@src
+POSTHOOK: Input: default@view16
#### A masked pattern was here ####
POSTHOOK: Lineage: table1.key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ]
val_0

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=1240005&r1=1240004&r2=1240005&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 Fri Feb 3 06:17:36 2012
@@ -84,28 +84,34 @@ WHERE `src`.`key`=86
PREHOOK: query: SELECT * FROM vp1
PREHOOK: type: QUERY
PREHOOK: Input: default@src
+PREHOOK: Input: default@vp1
#### A masked pattern was here ####
POSTHOOK: query: SELECT * FROM vp1
POSTHOOK: type: QUERY
POSTHOOK: Input: default@src
+POSTHOOK: Input: default@vp1
#### A masked pattern was here ####
86 val_86
PREHOOK: query: SELECT key FROM vp1
PREHOOK: type: QUERY
PREHOOK: Input: default@src
+PREHOOK: Input: default@vp1
#### A masked pattern was here ####
POSTHOOK: query: SELECT key FROM vp1
POSTHOOK: type: QUERY
POSTHOOK: Input: default@src
+POSTHOOK: Input: default@vp1
#### A masked pattern was here ####
86
PREHOOK: query: SELECT value FROM vp1
PREHOOK: type: QUERY
PREHOOK: Input: default@src
+PREHOOK: Input: default@vp1
#### A masked pattern was here ####
POSTHOOK: query: SELECT value FROM vp1
POSTHOOK: type: QUERY
POSTHOOK: Input: default@src
+POSTHOOK: Input: default@vp1
#### A masked pattern was here ####
val_86
PREHOOK: query: ALTER VIEW vp1
@@ -203,6 +209,7 @@ PREHOOK: query: -- Even though no partit
SELECT * FROM vp1
PREHOOK: type: QUERY
PREHOOK: Input: default@src
+PREHOOK: Input: default@vp1
#### A masked pattern was here ####
POSTHOOK: query: -- Even though no partition predicate is specified in the next query,
-- the WHERE clause inside of the view should satisfy strict mode.
@@ -211,6 +218,7 @@ POSTHOOK: query: -- Even though no parti
SELECT * FROM vp1
POSTHOOK: type: QUERY
POSTHOOK: Input: default@src
+POSTHOOK: Input: default@vp1
#### A masked pattern was here ####
86 val_86
PREHOOK: query: -- test a partitioned view on top of an underlying partitioned table,
@@ -284,11 +292,13 @@ PREHOOK: query: SELECT key FROM vp2 WHER
PREHOOK: type: QUERY
PREHOOK: Input: default@srcpart@ds=2008-04-08/hr=12
PREHOOK: Input: default@srcpart@ds=2008-04-09/hr=12
+PREHOOK: Input: default@vp2
#### A masked pattern was here ####
POSTHOOK: query: SELECT key FROM vp2 WHERE hr='12' ORDER BY key
POSTHOOK: type: QUERY
POSTHOOK: Input: default@srcpart@ds=2008-04-08/hr=12
POSTHOOK: Input: default@srcpart@ds=2008-04-09/hr=12
+POSTHOOK: Input: default@vp2
#### A masked pattern was here ####



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=1240005&r1=1240004&r2=1240005&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 Fri Feb 3 06:17:36 2012
@@ -496,11 +496,13 @@ STAGE PLANS:

PREHOOK: query: select * from t1 where ds = '2011-10-13'
PREHOOK: type: QUERY
+PREHOOK: Input: default@t1
PREHOOK: Input: default@t1_mapping@ds=2011-10-13
PREHOOK: Input: default@t1_old@ds=2011-10-13
#### A masked pattern was here ####
POSTHOOK: query: select * from t1 where ds = '2011-10-13'
POSTHOOK: type: QUERY
+POSTHOOK: Input: default@t1
POSTHOOK: Input: default@t1_mapping@ds=2011-10-13
POSTHOOK: Input: default@t1_old@ds=2011-10-13
#### A masked pattern was here ####
@@ -519,11 +521,13 @@ POSTHOOK: Lineage: t1_old PARTITION(ds=2
key3 value3 2011-10-13
PREHOOK: query: select * from t1 where ds = '2011-10-14'
PREHOOK: type: QUERY
+PREHOOK: Input: default@t1
PREHOOK: Input: default@t1_mapping@ds=2011-10-14
PREHOOK: Input: default@t1_old@ds=2011-10-14
#### A masked pattern was here ####
POSTHOOK: query: select * from t1 where ds = '2011-10-14'
POSTHOOK: type: QUERY
+POSTHOOK: Input: default@t1
POSTHOOK: Input: default@t1_mapping@ds=2011-10-14
POSTHOOK: Input: default@t1_old@ds=2011-10-14
#### A masked pattern was here ####
@@ -822,10 +826,12 @@ STAGE PLANS:

PREHOOK: query: select * from t1 where ds = '2011-10-15'
PREHOOK: type: QUERY
+PREHOOK: Input: default@t1
PREHOOK: Input: default@t1_new@ds=2011-10-15
#### A masked pattern was here ####
POSTHOOK: query: select * from t1 where ds = '2011-10-15'
POSTHOOK: type: QUERY
+POSTHOOK: Input: default@t1
POSTHOOK: Input: default@t1_new@ds=2011-10-15
#### A masked pattern was here ####
POSTHOOK: Lineage: t1_mapping PARTITION(ds=2011-10-13).key SIMPLE []
@@ -843,10 +849,12 @@ POSTHOOK: Lineage: t1_old PARTITION(ds=2
key1 value1 2011-10-15
PREHOOK: query: select * from t1 where ds = '2011-10-16'
PREHOOK: type: QUERY
+PREHOOK: Input: default@t1
PREHOOK: Input: default@t1_new@ds=2011-10-16
#### A masked pattern was here ####
POSTHOOK: query: select * from t1 where ds = '2011-10-16'
POSTHOOK: type: QUERY
+POSTHOOK: Input: default@t1
POSTHOOK: Input: default@t1_new@ds=2011-10-16
#### A masked pattern was here ####
POSTHOOK: Lineage: t1_mapping PARTITION(ds=2011-10-13).key SIMPLE []

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupcommits @
categorieshive, hadoop
postedFeb 3, '12 at 6:18a
activeFeb 3, '12 at 6:18a
posts1
users1
websitehive.apache.org

1 user in discussion

Namit: 1 post

People

Translate

site design / logo © 2021 Grokbase