PREHOOK: query: drop view if exists v PREHOOK: type: DROPVIEW POSTHOOK: query: drop view if exists v POSTHOOK: type: DROPVIEW PREHOOK: query: drop view if exists w PREHOOK: type: DROPVIEW 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 PREHOOK: Output: database:default PREHOOK: Output: default@v POSTHOOK: query: create view v as select cast(key as string) from src POSTHOOK: type: CREATEVIEW POSTHOOK: Input: default@src POSTHOOK: Output: database:default POSTHOOK: Output: default@v PREHOOK: query: describe formatted v PREHOOK: type: DESCTABLE PREHOOK: Input: default@v POSTHOOK: query: describe formatted v POSTHOOK: type: DESCTABLE POSTHOOK: Input: default@v # col_name data_type comment key string # Detailed Table Information Database: default #### A masked pattern was here #### Protect Mode: None Retention: 0 Table Type: VIRTUAL_VIEW Table Parameters: #### A masked pattern was here #### # Storage Information SerDe Library: null InputFormat: org.apache.hadoop.mapred.SequenceFileInputFormat OutputFormat: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat Compressed: No Num Buckets: -1 Bucket Columns: [] Sort Columns: [] # View Information View Original Text: select cast(key as string) from src View Expanded Text: select `src`.`key` from `default`.`src` PREHOOK: query: create view w as select key, value from ( select key, value from src ) a PREHOOK: type: CREATEVIEW PREHOOK: Input: default@src PREHOOK: Output: database:default PREHOOK: Output: default@w 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: database:default POSTHOOK: Output: default@w PREHOOK: query: describe formatted w PREHOOK: type: DESCTABLE PREHOOK: Input: default@w POSTHOOK: query: describe formatted w POSTHOOK: type: DESCTABLE POSTHOOK: Input: default@w # col_name data_type comment key string value string # Detailed Table Information Database: default #### A masked pattern was here #### Protect Mode: None Retention: 0 Table Type: VIRTUAL_VIEW Table Parameters: #### A masked pattern was here #### # Storage Information SerDe Library: null InputFormat: org.apache.hadoop.mapred.SequenceFileInputFormat OutputFormat: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat Compressed: No Num Buckets: -1 Bucket Columns: [] Sort Columns: [] # View Information View Original Text: select key, value from ( select key, value from src ) a View Expanded Text: select `a`.`key`, `a`.`value` from ( select `src`.`key`, `src`.`value` from `default`.`src` ) `a` PREHOOK: query: drop view v PREHOOK: type: DROPVIEW PREHOOK: Input: default@v PREHOOK: Output: default@v POSTHOOK: query: drop view v POSTHOOK: type: DROPVIEW POSTHOOK: Input: default@v POSTHOOK: Output: default@v PREHOOK: query: drop view w PREHOOK: type: DROPVIEW PREHOOK: Input: default@w PREHOOK: Output: default@w POSTHOOK: query: drop view w POSTHOOK: type: DROPVIEW POSTHOOK: Input: default@w POSTHOOK: Output: default@w PREHOOK: query: -- HIVE-4116 Can't use views using map datatype. CREATE TABLE items (id INT, name STRING, info MAP) PREHOOK: type: CREATETABLE PREHOOK: Output: database:default PREHOOK: Output: default@items POSTHOOK: query: -- HIVE-4116 Can't use views using map datatype. CREATE TABLE items (id INT, name STRING, info MAP) POSTHOOK: type: CREATETABLE POSTHOOK: Output: database:default POSTHOOK: Output: default@items PREHOOK: query: explain CREATE VIEW priceview AS SELECT items.id, items.info['price'] FROM items PREHOOK: type: CREATEVIEW POSTHOOK: query: explain CREATE VIEW priceview AS SELECT items.id, items.info['price'] FROM items POSTHOOK: type: CREATEVIEW STAGE DEPENDENCIES: Stage-0 is a root stage STAGE PLANS: Stage: Stage-0 Create View Operator: Create View or replace: false columns: id int, _c1 string expanded text: SELECT `items`.`id`, `items`.`info`['price'] FROM `default`.`items` name: default.priceview original text: SELECT items.id, items.info['price'] FROM items PREHOOK: query: CREATE VIEW priceview AS SELECT items.id, items.info['price'] FROM items PREHOOK: type: CREATEVIEW PREHOOK: Input: default@items PREHOOK: Output: database:default PREHOOK: Output: default@priceview POSTHOOK: query: CREATE VIEW priceview AS SELECT items.id, items.info['price'] FROM items POSTHOOK: type: CREATEVIEW POSTHOOK: Input: default@items POSTHOOK: Output: database:default POSTHOOK: Output: default@priceview PREHOOK: query: select * from priceview PREHOOK: type: QUERY PREHOOK: Input: default@items PREHOOK: Input: default@priceview #### A masked pattern was here #### POSTHOOK: query: select * from priceview POSTHOOK: type: QUERY POSTHOOK: Input: default@items POSTHOOK: Input: default@priceview #### A masked pattern was here ####