diff --git a/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java b/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java index 20d9649..ed938b0 100644 --- a/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java +++ b/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java @@ -3385,23 +3385,12 @@ Integer genColListRegex(String colRegex, String tabAlias, ASTNode sel, pos = Integer.valueOf(pos.intValue() + 1); matched++; - if (unparseTranslator.isEnabled()) { - if (replacementText.length() > 0) { - replacementText.append(", "); - } - replacementText.append(HiveUtils.unparseIdentifier(tmp[0], conf)); - replacementText.append("."); - replacementText.append(HiveUtils.unparseIdentifier(tmp[1], conf)); - } } } if (matched == 0) { throw new SemanticException(ErrorMsg.INVALID_COLUMN.getMsg(sel)); } - if (unparseTranslator.isEnabled()) { - unparseTranslator.addTranslation(sel, replacementText.toString()); - } return pos; } @@ -10998,6 +10987,10 @@ private void saveViewDefinition() throws SemanticException { viewSelect, ErrorMsg.VIEW_COL_MISMATCH.getMsg())); } + } else { + // always impose schema to make the schema consistent + imposedSchema = new ArrayList<>(); + imposedSchema.addAll(resultSchema); } // Preserve the original view definition as specified by the user. @@ -11012,39 +11005,42 @@ private void saveViewDefinition() throws SemanticException { String expandedText = ctx.getTokenRewriteStream().toString( viewSelect.getTokenStartIndex(), viewSelect.getTokenStopIndex()); - if (imposedSchema != null) { - // Merge the names from the imposed schema into the types - // from the derived schema. - StringBuilder sb = new StringBuilder(); - sb.append("SELECT "); - int n = derivedSchema.size(); - for (int i = 0; i < n; ++i) { - if (i > 0) { - sb.append(", "); - } - FieldSchema fieldSchema = derivedSchema.get(i); - // Modify a copy, not the original - fieldSchema = new FieldSchema(fieldSchema); - // TODO: there's a potential problem here if some table uses external schema like Avro, - // with a very large type name. It seems like the view does not derive the SerDe from - // the table, so it won't be able to just get the type from the deserializer like the - // table does; we won't be able to properly store the type in the RDBMS metastore. - // Not sure if these large cols could be in resultSchema. Ignore this for now 0_o - derivedSchema.set(i, fieldSchema); - sb.append(HiveUtils.unparseIdentifier(fieldSchema.getName(), conf)); - sb.append(" AS "); - String imposedName = imposedSchema.get(i).getName(); - sb.append(HiveUtils.unparseIdentifier(imposedName, conf)); - fieldSchema.setName(imposedName); - // We don't currently allow imposition of a type - fieldSchema.setComment(imposedSchema.get(i).getComment()); - } - sb.append(" FROM ("); - sb.append(expandedText); - sb.append(") "); - sb.append(HiveUtils.unparseIdentifier(createVwDesc.getViewName(), conf)); - expandedText = sb.toString(); - } + // Merge the names from the imposed schema into the types + // from the derived schema. + StringBuilder sb = new StringBuilder(); + sb.append("SELECT "); + int n = derivedSchema.size(); + for (int i = 0; i < n; ++i) { + if (i > 0) { + sb.append(", "); + } + FieldSchema fieldSchema = derivedSchema.get(i); + // Modify a copy, not the original + fieldSchema = new FieldSchema(fieldSchema); + // TODO: there's a potential problem here if some table uses external + // schema like Avro, + // with a very large type name. It seems like the view does not derive the + // SerDe from + // the table, so it won't be able to just get the type from the + // deserializer like the + // table does; we won't be able to properly store the type in the RDBMS + // metastore. + // Not sure if these large cols could be in resultSchema. Ignore this for + // now 0_o + derivedSchema.set(i, fieldSchema); + sb.append(HiveUtils.unparseIdentifier(fieldSchema.getName(), conf)); + sb.append(" AS "); + String imposedName = imposedSchema.get(i).getName(); + sb.append(HiveUtils.unparseIdentifier(imposedName, conf)); + fieldSchema.setName(imposedName); + // We don't currently allow imposition of a type + fieldSchema.setComment(imposedSchema.get(i).getComment()); + } + sb.append(" FROM ("); + sb.append(expandedText); + sb.append(") "); + sb.append(HiveUtils.unparseIdentifier(createVwDesc.getViewName(), conf)); + expandedText = sb.toString(); if (createVwDesc.getPartColNames() != null) { // Make sure all partitioning columns referenced actually diff --git a/ql/src/java/org/apache/hadoop/hive/ql/parse/TableMask.java b/ql/src/java/org/apache/hadoop/hive/ql/parse/TableMask.java index 1686f36..62c4853 100644 --- a/ql/src/java/org/apache/hadoop/hive/ql/parse/TableMask.java +++ b/ql/src/java/org/apache/hadoop/hive/ql/parse/TableMask.java @@ -23,6 +23,7 @@ import org.antlr.runtime.TokenRewriteStream; import org.apache.hadoop.hive.conf.HiveConf; import org.apache.hadoop.hive.metastore.api.FieldSchema; +import org.apache.hadoop.hive.ql.metadata.HiveUtils; import org.apache.hadoop.hive.ql.metadata.Table; import org.apache.hadoop.hive.ql.security.authorization.plugin.HiveAuthorizer; import org.apache.hadoop.hive.ql.security.authorization.plugin.HivePrivilegeObject; @@ -46,10 +47,12 @@ private boolean enable; private boolean needsRewrite; private HiveAuthzContext queryContext; + private HiveConf conf; public TableMask(SemanticAnalyzer analyzer, HiveConf conf) throws SemanticException { try { authorizer = SessionState.get().getAuthorizerV2(); + this.conf = conf; String cmdString = analyzer.ctx.getCmd(); SessionState ss = SessionState.get(); HiveAuthzContext.Builder ctxBuilder = new HiveAuthzContext.Builder(); @@ -83,6 +86,8 @@ public boolean needTransform() throws SemanticException { public String create(HivePrivilegeObject privObject, MaskAndFilterInfo maskAndFilterInfo) throws SemanticException { + boolean doColumnMasking = false; + boolean doRowFiltering = false; StringBuilder sb = new StringBuilder(); sb.append("(SELECT "); boolean firstOne = true; @@ -107,31 +112,37 @@ public String create(HivePrivilegeObject privObject, MaskAndFilterInfo maskAndFi String colName = privObject.getColumns().get(index); if (!expr.equals(colName)) { // CAST(expr AS COLTYPE) AS COLNAME - sb.append("CAST(" + expr + " AS " + colTypes.get(index) + ") AS `" + colName + "`"); + sb.append("CAST(" + expr + " AS " + colTypes.get(index) + ") AS " + + HiveUtils.unparseIdentifier(colName, conf)); + doColumnMasking = true; } else { - sb.append(expr); + sb.append(HiveUtils.unparseIdentifier(colName, conf)); } } - } else { - for (int index = 0; index < privObject.getColumns().size(); index++) { - String expr = privObject.getColumns().get(index); - if (!firstOne) { - sb.append(", "); - } else { - firstOne = false; - } - sb.append(expr); - } + } + if (!doColumnMasking) { + sb = new StringBuilder(); + sb.append("(SELECT *"); } - sb.append(" FROM `" + privObject.getDbname() + "`.`" + privObject.getObjectName() + "`"); + sb.append(" FROM "); + sb.append(HiveUtils.unparseIdentifier(privObject.getDbname(), conf)); + sb.append("."); + sb.append(HiveUtils.unparseIdentifier(privObject.getObjectName(), conf)); sb.append(" " + maskAndFilterInfo.additionalTabInfo); String filter = privObject.getRowFilterExpression(); if (filter != null) { sb.append(" WHERE " + filter); + doRowFiltering = true; + } + sb.append(")" + HiveUtils.unparseIdentifier(maskAndFilterInfo.alias, conf)); + + if (!doColumnMasking && !doRowFiltering) { + // nothing to do + return null; + } else { + LOG.debug("TableMask creates `" + sb.toString() + "`"); + return sb.toString(); } - sb.append(")" + maskAndFilterInfo.alias); - LOG.debug("TableMask creates `" + sb.toString() + "`"); - return sb.toString(); } void addTableMasking(ASTNode node, String replacementText) throws SemanticException { diff --git a/ql/src/test/queries/clientpositive/masking_6.q b/ql/src/test/queries/clientpositive/masking_6.q new file mode 100644 index 0000000..e266741 --- /dev/null +++ b/ql/src/test/queries/clientpositive/masking_6.q @@ -0,0 +1,28 @@ +set hive.mapred.mode=nonstrict; +set hive.security.authorization.manager=org.apache.hadoop.hive.ql.security.authorization.plugin.sqlstd.SQLStdHiveAuthorizerFactoryForTest; + +drop view masking_test; + +create view masking_test as select cast(key as int) as key, value, '12' from src; + +explain select * from masking_test; + +select * from masking_test; + +explain select * from masking_test where key > 0; + +select * from masking_test where key > 0; + +drop view masking_test; + +create view masking_test as select cast(key as int) as key, '12', +'12', '12', '12', '12', '12', '12', '12', '12', '12', '12' + from src; + +explain select * from masking_test; + +select * from masking_test; + +explain select * from masking_test where key > 0; + +select * from masking_test where key > 0; diff --git a/ql/src/test/queries/clientpositive/view_alias.q b/ql/src/test/queries/clientpositive/view_alias.q new file mode 100644 index 0000000..ed2b821 --- /dev/null +++ b/ql/src/test/queries/clientpositive/view_alias.q @@ -0,0 +1,24 @@ +drop view v; +create view v as select key, '12' from src; +desc formatted v; +select * from v order by `_c1` limit 5; + +drop view v; +create view v as select key as `_c1`, '12' from src; +desc formatted v; +select * from v order by `_c1` limit 5; + +drop view v; +create view v as select *, '12' from src; +desc formatted v; +select * from v order by `_c1` limit 5; + +drop view v; +create view v as select *, '12' as `_c121` from src; +desc formatted v; +select * from v order by `_c121` limit 5; + +drop view v; +create view v as select key, count(*) from src group by key; +desc formatted v; +select * from v order by `_c1` limit 5; diff --git a/ql/src/test/results/clientpositive/create_view.q.out b/ql/src/test/results/clientpositive/create_view.q.out index d9c1e11..8b7891b 100644 --- a/ql/src/test/results/clientpositive/create_view.q.out +++ b/ql/src/test/results/clientpositive/create_view.q.out @@ -266,7 +266,7 @@ Sort Columns: [] # View Information View Original Text: SELECT value FROM src WHERE key=86 -View Expanded Text: SELECT `src`.`value` FROM `default`.`src` WHERE `src`.`key`=86 +View Expanded Text: SELECT `value` AS `value` FROM (SELECT `src`.`value` FROM `default`.`src` WHERE `src`.`key`=86) `default.view1` PREHOOK: query: DESCRIBE view2 PREHOOK: type: DESCTABLE PREHOOK: Input: default@view2 @@ -315,7 +315,7 @@ Sort Columns: [] # View Information View Original Text: SELECT * FROM src -View Expanded Text: SELECT `src`.`key`, `src`.`value` FROM `default`.`src` +View Expanded Text: SELECT `key` AS `key`, `value` AS `value` FROM (SELECT * FROM `default`.`src`) `default.view2` PREHOOK: query: DESCRIBE view3 PREHOOK: type: DESCTABLE PREHOOK: Input: default@view3 @@ -999,7 +999,7 @@ Sort Columns: [] # View Information View Original Text: SELECT slurp.* FROM (SELECT * FROM src WHERE key=86) slurp -View Expanded Text: SELECT `slurp`.`key`, `slurp`.`value` FROM (SELECT `src`.`key`, `src`.`value` FROM `default`.`src` WHERE `src`.`key`=86) `slurp` +View Expanded Text: SELECT `key` AS `key`, `value` AS `value` FROM (SELECT slurp.* FROM (SELECT * FROM `default`.`src` WHERE `src`.`key`=86) `slurp`) `default.view10` PREHOOK: query: SELECT * FROM view10 PREHOOK: type: QUERY PREHOOK: Input: default@src @@ -1044,8 +1044,8 @@ POSTHOOK: Input: default@view11 boom int #### A masked pattern was here #### -FROM table1, viewExpandedText:SELECT `test_explode`(array(1,2,3)) AS (`boom`) -FROM `default`.`table1`, tableType:VIRTUAL_VIEW) +FROM table1, viewExpandedText:SELECT `boom` AS `boom` FROM (SELECT `test_explode`(array(1,2,3)) AS (`boom`) +FROM `default`.`table1`) `default.view11`, tableType:VIRTUAL_VIEW) PREHOOK: query: DESCRIBE FORMATTED view11 PREHOOK: type: DESCTABLE PREHOOK: Input: default@view11 @@ -1076,8 +1076,8 @@ Sort Columns: [] # View Information View Original Text: SELECT test_explode(array(1,2,3)) AS (boom) FROM table1 -View Expanded Text: SELECT `test_explode`(array(1,2,3)) AS (`boom`) -FROM `default`.`table1` +View Expanded Text: SELECT `boom` AS `boom` FROM (SELECT `test_explode`(array(1,2,3)) AS (`boom`) +FROM `default`.`table1`) `default.view11` PREHOOK: query: SELECT * FROM view11 PREHOOK: type: QUERY PREHOOK: Input: default@table1 @@ -1147,7 +1147,7 @@ Sort Columns: [] # View Information View Original Text: SELECT * FROM src LATERAL VIEW explode(array(1,2,3)) myTable AS myCol -View Expanded Text: SELECT `src`.`key`, `src`.`value`, `mytable`.`mycol` FROM `default`.`src` LATERAL VIEW explode(array(1,2,3)) `myTable` AS `myCol` +View Expanded Text: SELECT `key` AS `key`, `value` AS `value`, `mycol` AS `mycol` FROM (SELECT * FROM `default`.`src` LATERAL VIEW explode(array(1,2,3)) `myTable` AS `myCol`) `default.view12` PREHOOK: query: SELECT * FROM view12 ORDER BY key ASC, myCol ASC LIMIT 1 PREHOOK: type: QUERY @@ -1201,8 +1201,8 @@ POSTHOOK: Input: default@view13 key int #### A masked pattern was here #### -FROM srcbucket TABLESAMPLE (BUCKET 1 OUT OF 5 ON key) s, viewExpandedText:SELECT `s`.`key` -FROM `default`.`srcbucket` TABLESAMPLE (BUCKET 1 OUT OF 5 ON `key`) `s`, tableType:VIRTUAL_VIEW) +FROM srcbucket TABLESAMPLE (BUCKET 1 OUT OF 5 ON key) s, viewExpandedText:SELECT `key` AS `key` FROM (SELECT `s`.`key` +FROM `default`.`srcbucket` TABLESAMPLE (BUCKET 1 OUT OF 5 ON `key`) `s`) `default.view13`, tableType:VIRTUAL_VIEW) PREHOOK: query: DESCRIBE FORMATTED view13 PREHOOK: type: DESCTABLE PREHOOK: Input: default@view13 @@ -1233,8 +1233,8 @@ Sort Columns: [] # View Information View Original Text: SELECT s.key FROM srcbucket TABLESAMPLE (BUCKET 1 OUT OF 5 ON key) s -View Expanded Text: SELECT `s`.`key` -FROM `default`.`srcbucket` TABLESAMPLE (BUCKET 1 OUT OF 5 ON `key`) `s` +View Expanded Text: SELECT `key` AS `key` FROM (SELECT `s`.`key` +FROM `default`.`srcbucket` TABLESAMPLE (BUCKET 1 OUT OF 5 ON `key`) `s`) `default.view13` PREHOOK: query: SELECT * FROM view13 ORDER BY key LIMIT 12 PREHOOK: type: QUERY @@ -1311,7 +1311,7 @@ JOIN (select 'tst1' as key, cast(count(1) as string) as value from src s3 UNION ALL select s4.key as key, s4.value as value from src s4 where s4.key < 10) unionsrc2 -ON (unionsrc1.key = unionsrc2.key), viewExpandedText:SELECT `unionsrc1`.`key` as `k1`, `unionsrc1`.`value` as `v1`, +ON (unionsrc1.key = unionsrc2.key), viewExpandedText:SELECT `k1` AS `k1`, `v1` AS `v1`, `k2` AS `k2`, `v2` AS `v2` FROM (SELECT `unionsrc1`.`key` as `k1`, `unionsrc1`.`value` as `v1`, `unionsrc2`.`key` as `k2`, `unionsrc2`.`value` as `v2` FROM (select 'tst1' as `key`, cast(count(1) as string) as `value` from `default`.`src` `s1` UNION ALL @@ -1320,7 +1320,7 @@ JOIN (select 'tst1' as `key`, cast(count(1) as string) as `value` from `default`.`src` `s3` UNION ALL select `s4`.`key` as `key`, `s4`.`value` as `value` from `default`.`src` `s4` where `s4`.`key` < 10) `unionsrc2` -ON (`unionsrc1`.`key` = `unionsrc2`.`key`), tableType:VIRTUAL_VIEW) +ON (`unionsrc1`.`key` = `unionsrc2`.`key`)) `default.view14`, tableType:VIRTUAL_VIEW) PREHOOK: query: DESCRIBE FORMATTED view14 PREHOOK: type: DESCTABLE PREHOOK: Input: default@view14 @@ -1362,7 +1362,7 @@ JOIN UNION ALL select s4.key as key, s4.value as value from src s4 where s4.key < 10) unionsrc2 ON (unionsrc1.key = unionsrc2.key) -View Expanded Text: SELECT `unionsrc1`.`key` as `k1`, `unionsrc1`.`value` as `v1`, +View Expanded Text: SELECT `k1` AS `k1`, `v1` AS `v1`, `k2` AS `k2`, `v2` AS `v2` FROM (SELECT `unionsrc1`.`key` as `k1`, `unionsrc1`.`value` as `v1`, `unionsrc2`.`key` as `k2`, `unionsrc2`.`value` as `v2` FROM (select 'tst1' as `key`, cast(count(1) as string) as `value` from `default`.`src` `s1` UNION ALL @@ -1371,7 +1371,7 @@ JOIN (select 'tst1' as `key`, cast(count(1) as string) as `value` from `default`.`src` `s3` UNION ALL select `s4`.`key` as `key`, `s4`.`value` as `value` from `default`.`src` `s4` where `s4`.`key` < 10) `unionsrc2` -ON (`unionsrc1`.`key` = `unionsrc2`.`key`) +ON (`unionsrc1`.`key` = `unionsrc2`.`key`)) `default.view14` PREHOOK: query: SELECT * FROM view14 ORDER BY k1 PREHOOK: type: QUERY @@ -1436,9 +1436,9 @@ value_count bigint #### A masked pattern was here #### FROM src -GROUP BY key, viewExpandedText:SELECT `src`.`key`,COUNT(`src`.`value`) AS `value_count` +GROUP BY key, viewExpandedText:SELECT `key` AS `key`, `value_count` AS `value_count` FROM (SELECT `src`.`key`,COUNT(`src`.`value`) AS `value_count` FROM `default`.`src` -GROUP BY `src`.`key`, tableType:VIRTUAL_VIEW) +GROUP BY `src`.`key`) `default.view15`, tableType:VIRTUAL_VIEW) PREHOOK: query: DESCRIBE FORMATTED view15 PREHOOK: type: DESCTABLE PREHOOK: Input: default@view15 @@ -1471,9 +1471,9 @@ Sort Columns: [] View Original Text: SELECT key,COUNT(value) AS value_count FROM src GROUP BY key -View Expanded Text: SELECT `src`.`key`,COUNT(`src`.`value`) AS `value_count` +View Expanded Text: SELECT `key` AS `key`, `value_count` AS `value_count` FROM (SELECT `src`.`key`,COUNT(`src`.`value`) AS `value_count` FROM `default`.`src` -GROUP BY `src`.`key` +GROUP BY `src`.`key`) `default.view15` PREHOOK: query: SELECT * FROM view15 ORDER BY value_count DESC, key LIMIT 10 @@ -1523,8 +1523,8 @@ POSTHOOK: Input: default@view16 value string #### A masked pattern was here #### -FROM src, viewExpandedText:SELECT DISTINCT `src`.`value` -FROM `default`.`src`, tableType:VIRTUAL_VIEW) +FROM src, viewExpandedText:SELECT `value` AS `value` FROM (SELECT DISTINCT `src`.`value` +FROM `default`.`src`) `default.view16`, tableType:VIRTUAL_VIEW) PREHOOK: query: DESCRIBE FORMATTED view16 PREHOOK: type: DESCTABLE PREHOOK: Input: default@view16 @@ -1555,8 +1555,8 @@ Sort Columns: [] # View Information View Original Text: SELECT DISTINCT value FROM src -View Expanded Text: SELECT DISTINCT `src`.`value` -FROM `default`.`src` +View Expanded Text: SELECT `value` AS `value` FROM (SELECT DISTINCT `src`.`value` +FROM `default`.`src`) `default.view16` PREHOOK: query: SELECT * FROM view16 ORDER BY value LIMIT 10 diff --git a/ql/src/test/results/clientpositive/create_view_translate.q.out b/ql/src/test/results/clientpositive/create_view_translate.q.out index 2789f8f..baf0ed8 100644 --- a/ql/src/test/results/clientpositive/create_view_translate.q.out +++ b/ql/src/test/results/clientpositive/create_view_translate.q.out @@ -45,7 +45,7 @@ Sort Columns: [] # View Information View Original Text: select cast(key as string) from src -View Expanded Text: select `src`.`key` from `default`.`src` +View Expanded Text: SELECT `key` AS `key` FROM (select `src`.`key` from `default`.`src`) `default.v` PREHOOK: query: create view w as select key, value from ( select key, value from src ) a @@ -92,9 +92,9 @@ Sort Columns: [] View Original Text: select key, value from ( select key, value from src ) a -View Expanded Text: select `a`.`key`, `a`.`value` from ( +View Expanded Text: SELECT `key` AS `key`, `value` AS `value` FROM (select `a`.`key`, `a`.`value` from ( select `src`.`key`, `src`.`value` from `default`.`src` -) `a` +) `a`) `default.w` PREHOOK: query: drop view v PREHOOK: type: DROPVIEW PREHOOK: Input: default@v @@ -138,7 +138,7 @@ STAGE PLANS: Create View or replace: false columns: id int, _c1 string - expanded text: SELECT `items`.`id`, `items`.`info`['price'] FROM `default`.`items` + expanded text: SELECT `id` AS `id`, `_c1` AS `_c1` FROM (SELECT `items`.`id`, `items`.`info`['price'] FROM `default`.`items`) `default.priceview` name: default.priceview original text: SELECT items.id, items.info['price'] FROM items diff --git a/ql/src/test/results/clientpositive/masking_6.q.out b/ql/src/test/results/clientpositive/masking_6.q.out new file mode 100644 index 0000000..fb8c90f --- /dev/null +++ b/ql/src/test/results/clientpositive/masking_6.q.out @@ -0,0 +1,238 @@ +PREHOOK: query: drop view masking_test +PREHOOK: type: DROPVIEW +POSTHOOK: query: drop view masking_test +POSTHOOK: type: DROPVIEW +PREHOOK: query: create view masking_test as select cast(key as int) as key, value, '12' from src +PREHOOK: type: CREATEVIEW +PREHOOK: Input: default@src +PREHOOK: Output: database:default +PREHOOK: Output: default@masking_test +POSTHOOK: query: create view masking_test as select cast(key as int) as key, value, '12' from src +POSTHOOK: type: CREATEVIEW +POSTHOOK: Input: default@src +POSTHOOK: Output: database:default +POSTHOOK: Output: default@masking_test +PREHOOK: query: explain select * from masking_test +PREHOOK: type: QUERY +POSTHOOK: query: explain select * from masking_test +POSTHOOK: type: QUERY +STAGE DEPENDENCIES: + Stage-1 is a root stage + Stage-0 depends on stages: Stage-1 + +STAGE PLANS: + Stage: Stage-1 + Map Reduce + Map Operator Tree: + TableScan + alias: src + Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (((UDFToInteger(key) % 2) = 0) and (UDFToInteger(key) < 10)) (type: boolean) + Statistics: Num rows: 83 Data size: 881 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: UDFToInteger(key) (type: int), reverse(value) (type: string), '12' (type: string) + outputColumnNames: _col0, _col1, _col2 + Statistics: Num rows: 83 Data size: 881 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + Statistics: Num rows: 83 Data size: 881 Basic stats: COMPLETE Column stats: NONE + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe + + Stage: Stage-0 + Fetch Operator + limit: -1 + Processor Tree: + ListSink + +PREHOOK: query: select * from masking_test +PREHOOK: type: QUERY +PREHOOK: Input: default@masking_test +PREHOOK: Input: default@src +#### A masked pattern was here #### +POSTHOOK: query: select * from masking_test +POSTHOOK: type: QUERY +POSTHOOK: Input: default@masking_test +POSTHOOK: Input: default@src +#### A masked pattern was here #### +0 0_lav 12 +4 4_lav 12 +8 8_lav 12 +0 0_lav 12 +0 0_lav 12 +2 2_lav 12 +PREHOOK: query: explain select * from masking_test where key > 0 +PREHOOK: type: QUERY +POSTHOOK: query: explain select * from masking_test where key > 0 +POSTHOOK: type: QUERY +STAGE DEPENDENCIES: + Stage-1 is a root stage + Stage-0 depends on stages: Stage-1 + +STAGE PLANS: + Stage: Stage-1 + Map Reduce + Map Operator Tree: + TableScan + alias: src + Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (((UDFToInteger(key) % 2) = 0) and (UDFToInteger(key) < 10) and (UDFToInteger(key) > 0)) (type: boolean) + Statistics: Num rows: 27 Data size: 286 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: UDFToInteger(key) (type: int), reverse(value) (type: string), '12' (type: string) + outputColumnNames: _col0, _col1, _col2 + Statistics: Num rows: 27 Data size: 286 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + Statistics: Num rows: 27 Data size: 286 Basic stats: COMPLETE Column stats: NONE + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe + + Stage: Stage-0 + Fetch Operator + limit: -1 + Processor Tree: + ListSink + +PREHOOK: query: select * from masking_test where key > 0 +PREHOOK: type: QUERY +PREHOOK: Input: default@masking_test +PREHOOK: Input: default@src +#### A masked pattern was here #### +POSTHOOK: query: select * from masking_test where key > 0 +POSTHOOK: type: QUERY +POSTHOOK: Input: default@masking_test +POSTHOOK: Input: default@src +#### A masked pattern was here #### +4 4_lav 12 +8 8_lav 12 +2 2_lav 12 +PREHOOK: query: drop view masking_test +PREHOOK: type: DROPVIEW +PREHOOK: Input: default@masking_test +PREHOOK: Output: default@masking_test +POSTHOOK: query: drop view masking_test +POSTHOOK: type: DROPVIEW +POSTHOOK: Input: default@masking_test +POSTHOOK: Output: default@masking_test +PREHOOK: query: create view masking_test as select cast(key as int) as key, '12', +'12', '12', '12', '12', '12', '12', '12', '12', '12', '12' + from src +PREHOOK: type: CREATEVIEW +PREHOOK: Input: default@src +PREHOOK: Output: database:default +PREHOOK: Output: default@masking_test +POSTHOOK: query: create view masking_test as select cast(key as int) as key, '12', +'12', '12', '12', '12', '12', '12', '12', '12', '12', '12' + from src +POSTHOOK: type: CREATEVIEW +POSTHOOK: Input: default@src +POSTHOOK: Output: database:default +POSTHOOK: Output: default@masking_test +PREHOOK: query: explain select * from masking_test +PREHOOK: type: QUERY +POSTHOOK: query: explain select * from masking_test +POSTHOOK: type: QUERY +STAGE DEPENDENCIES: + Stage-1 is a root stage + Stage-0 depends on stages: Stage-1 + +STAGE PLANS: + Stage: Stage-1 + Map Reduce + Map Operator Tree: + TableScan + alias: src + Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (((UDFToInteger(key) % 2) = 0) and (UDFToInteger(key) < 10)) (type: boolean) + Statistics: Num rows: 83 Data size: 881 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: UDFToInteger(key) (type: int), '12' (type: string), '12' (type: string), '12' (type: string), '12' (type: string), '12' (type: string), '12' (type: string), '12' (type: string), '12' (type: string), '12' (type: string), '12' (type: string), '12' (type: string) + outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10, _col11 + Statistics: Num rows: 83 Data size: 881 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + Statistics: Num rows: 83 Data size: 881 Basic stats: COMPLETE Column stats: NONE + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe + + Stage: Stage-0 + Fetch Operator + limit: -1 + Processor Tree: + ListSink + +PREHOOK: query: select * from masking_test +PREHOOK: type: QUERY +PREHOOK: Input: default@masking_test +PREHOOK: Input: default@src +#### A masked pattern was here #### +POSTHOOK: query: select * from masking_test +POSTHOOK: type: QUERY +POSTHOOK: Input: default@masking_test +POSTHOOK: Input: default@src +#### A masked pattern was here #### +0 12 12 12 12 12 12 12 12 12 12 12 +4 12 12 12 12 12 12 12 12 12 12 12 +8 12 12 12 12 12 12 12 12 12 12 12 +0 12 12 12 12 12 12 12 12 12 12 12 +0 12 12 12 12 12 12 12 12 12 12 12 +2 12 12 12 12 12 12 12 12 12 12 12 +PREHOOK: query: explain select * from masking_test where key > 0 +PREHOOK: type: QUERY +POSTHOOK: query: explain select * from masking_test where key > 0 +POSTHOOK: type: QUERY +STAGE DEPENDENCIES: + Stage-1 is a root stage + Stage-0 depends on stages: Stage-1 + +STAGE PLANS: + Stage: Stage-1 + Map Reduce + Map Operator Tree: + TableScan + alias: src + Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (((UDFToInteger(key) % 2) = 0) and (UDFToInteger(key) < 10) and (UDFToInteger(key) > 0)) (type: boolean) + Statistics: Num rows: 27 Data size: 286 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: UDFToInteger(key) (type: int), '12' (type: string), '12' (type: string), '12' (type: string), '12' (type: string), '12' (type: string), '12' (type: string), '12' (type: string), '12' (type: string), '12' (type: string), '12' (type: string), '12' (type: string) + outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10, _col11 + Statistics: Num rows: 27 Data size: 286 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + Statistics: Num rows: 27 Data size: 286 Basic stats: COMPLETE Column stats: NONE + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe + + Stage: Stage-0 + Fetch Operator + limit: -1 + Processor Tree: + ListSink + +PREHOOK: query: select * from masking_test where key > 0 +PREHOOK: type: QUERY +PREHOOK: Input: default@masking_test +PREHOOK: Input: default@src +#### A masked pattern was here #### +POSTHOOK: query: select * from masking_test where key > 0 +POSTHOOK: type: QUERY +POSTHOOK: Input: default@masking_test +POSTHOOK: Input: default@src +#### A masked pattern was here #### +4 12 12 12 12 12 12 12 12 12 12 12 +8 12 12 12 12 12 12 12 12 12 12 12 +2 12 12 12 12 12 12 12 12 12 12 12 diff --git a/ql/src/test/results/clientpositive/subquery_views.q.out b/ql/src/test/results/clientpositive/subquery_views.q.out index 046f0fe..cd250b2 100644 --- a/ql/src/test/results/clientpositive/subquery_views.q.out +++ b/ql/src/test/results/clientpositive/subquery_views.q.out @@ -40,12 +40,12 @@ from src b where exists (select a.key from src a - where b.value = a.value and a.key = b.key and a.value > 'val_9'), viewExpandedText:select `b`.`key`, `b`.`value` + where b.value = a.value and a.key = b.key and a.value > 'val_9'), viewExpandedText:SELECT `key` AS `key`, `value` AS `value` FROM (select * from `default`.`src` `b` where exists (select `a`.`key` from `default`.`src` `a` - where `b`.`value` = `a`.`value` and `a`.`key` = `b`.`key` and `a`.`value` > 'val_9'), tableType:VIRTUAL_VIEW) + where `b`.`value` = `a`.`value` and `a`.`key` = `b`.`key` and `a`.`value` > 'val_9')) `default.cv1`, tableType:VIRTUAL_VIEW) PREHOOK: query: select * from cv1 where cv1.key in (select key from cv1 c where c.key > '95') PREHOOK: type: QUERY @@ -104,13 +104,13 @@ where b.key not in (select a.key from src a where b.value = a.value and a.key = b.key and a.value > 'val_11' - ), viewExpandedText:select `b`.`key`, `b`.`value` + ), viewExpandedText:SELECT `key` AS `key`, `value` AS `value` FROM (select * from `default`.`src` `b` where `b`.`key` not in (select `a`.`key` from `default`.`src` `a` where `b`.`value` = `a`.`value` and `a`.`key` = `b`.`key` and `a`.`value` > 'val_11' - ), tableType:VIRTUAL_VIEW) + )) `default.cv2`, tableType:VIRTUAL_VIEW) Warning: Shuffle Join JOIN[17][tables = [$hdt$_0, $hdt$_1]] in Stage 'Stage-1:MAPRED' is a cross product Warning: Shuffle Join JOIN[40][tables = [$hdt$_1, $hdt$_2]] in Stage 'Stage-6:MAPRED' is a cross product PREHOOK: query: explain @@ -136,7 +136,7 @@ STAGE PLANS: Map Reduce Map Operator Tree: TableScan - alias: a + alias: b Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE Filter Operator predicate: ((value > 'val_11') and (key is null or value is null)) (type: boolean) @@ -217,7 +217,7 @@ STAGE PLANS: Map-reduce partition columns: _col0 (type: string), _col1 (type: string), _col0 (type: string) Statistics: Num rows: 166 Data size: 3257 Basic stats: COMPLETE Column stats: NONE TableScan - alias: a + alias: b Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE Filter Operator predicate: ((value > 'val_11') and (key < '11')) (type: boolean) @@ -291,7 +291,7 @@ STAGE PLANS: Map Reduce Map Operator Tree: TableScan - alias: a + alias: b Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE Filter Operator predicate: ((value > 'val_11') and (key is null or value is null)) (type: boolean) @@ -372,7 +372,7 @@ STAGE PLANS: Map-reduce partition columns: _col0 (type: string), _col1 (type: string), _col0 (type: string) Statistics: Num rows: 166 Data size: 3257 Basic stats: COMPLETE Column stats: NONE TableScan - alias: a + alias: b Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE Filter Operator predicate: ((value > 'val_11') and (key < '11')) (type: boolean) @@ -481,11 +481,11 @@ _c2 bigint from src b where b.key in (select key from src where src.key > '8') group by key, value -having count(*) in (select count(*) from src s1 where s1.key > '9' group by s1.key ), viewExpandedText:select `b`.`key`, `b`.`value`, count(*) +having count(*) in (select count(*) from src s1 where s1.key > '9' group by s1.key ), viewExpandedText:SELECT `key` AS `key`, `value` AS `value`, `_c2` AS `_c2` FROM (select `b`.`key`, `b`.`value`, count(*) from `default`.`src` `b` where `b`.`key` in (select `src`.`key` from `default`.`src` where `src`.`key` > '8') group by `b`.`key`, `b`.`value` -having count(*) in (select count(*) from `default`.`src` `s1` where `s1`.`key` > '9' group by `s1`.`key` ), tableType:VIRTUAL_VIEW) +having count(*) in (select count(*) from `default`.`src` `s1` where `s1`.`key` > '9' group by `s1`.`key` )) `default.cv3`, tableType:VIRTUAL_VIEW) PREHOOK: query: select * from cv3 PREHOOK: type: QUERY PREHOOK: Input: default@cv3 diff --git a/ql/src/test/results/clientpositive/view_alias.q.out b/ql/src/test/results/clientpositive/view_alias.q.out new file mode 100644 index 0000000..de9e8cd --- /dev/null +++ b/ql/src/test/results/clientpositive/view_alias.q.out @@ -0,0 +1,318 @@ +PREHOOK: query: drop view v +PREHOOK: type: DROPVIEW +POSTHOOK: query: drop view v +POSTHOOK: type: DROPVIEW +PREHOOK: query: create view v as select key, '12' from src +PREHOOK: type: CREATEVIEW +PREHOOK: Input: default@src +PREHOOK: Output: database:default +PREHOOK: Output: default@v +POSTHOOK: query: create view v as select key, '12' from src +POSTHOOK: type: CREATEVIEW +POSTHOOK: Input: default@src +POSTHOOK: Output: database:default +POSTHOOK: Output: default@v +PREHOOK: query: desc formatted v +PREHOOK: type: DESCTABLE +PREHOOK: Input: default@v +POSTHOOK: query: desc formatted v +POSTHOOK: type: DESCTABLE +POSTHOOK: Input: default@v +# col_name data_type comment + +key string +_c1 string + +# Detailed Table Information +Database: default +#### A masked pattern was here #### +Retention: 0 +Table Type: VIRTUAL_VIEW +Table Parameters: +#### A masked pattern was here #### + +# Storage Information +SerDe Library: null +InputFormat: org.apache.hadoop.mapred.TextInputFormat +OutputFormat: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat +Compressed: No +Num Buckets: -1 +Bucket Columns: [] +Sort Columns: [] + +# View Information +View Original Text: select key, '12' from src +View Expanded Text: SELECT `key` AS `key`, `_c1` AS `_c1` FROM (select `src`.`key`, '12' from `default`.`src`) `default.v` +PREHOOK: query: select * from v order by `_c1` limit 5 +PREHOOK: type: QUERY +PREHOOK: Input: default@src +PREHOOK: Input: default@v +#### A masked pattern was here #### +POSTHOOK: query: select * from v order by `_c1` limit 5 +POSTHOOK: type: QUERY +POSTHOOK: Input: default@src +POSTHOOK: Input: default@v +#### A masked pattern was here #### +165 12 +27 12 +311 12 +97 12 +238 12 +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: create view v as select key as `_c1`, '12' from src +PREHOOK: type: CREATEVIEW +PREHOOK: Input: default@src +PREHOOK: Output: database:default +PREHOOK: Output: default@v +POSTHOOK: query: create view v as select key as `_c1`, '12' from src +POSTHOOK: type: CREATEVIEW +POSTHOOK: Input: default@src +POSTHOOK: Output: database:default +POSTHOOK: Output: default@v +PREHOOK: query: desc formatted v +PREHOOK: type: DESCTABLE +PREHOOK: Input: default@v +POSTHOOK: query: desc formatted v +POSTHOOK: type: DESCTABLE +POSTHOOK: Input: default@v +# col_name data_type comment + +key string +_c1 string + +# Detailed Table Information +Database: default +#### A masked pattern was here #### +Retention: 0 +Table Type: VIRTUAL_VIEW +Table Parameters: +#### A masked pattern was here #### + +# Storage Information +SerDe Library: null +InputFormat: org.apache.hadoop.mapred.TextInputFormat +OutputFormat: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat +Compressed: No +Num Buckets: -1 +Bucket Columns: [] +Sort Columns: [] + +# View Information +View Original Text: select key as _c1, '12' from src +View Expanded Text: SELECT `key` AS `key`, `_c1` AS `_c1` FROM (select `src`.`key` as `_c1`, '12' from `default`.`src`) `default.v` +PREHOOK: query: select * from v order by `_c1` limit 5 +PREHOOK: type: QUERY +PREHOOK: Input: default@src +PREHOOK: Input: default@v +#### A masked pattern was here #### +POSTHOOK: query: select * from v order by `_c1` limit 5 +POSTHOOK: type: QUERY +POSTHOOK: Input: default@src +POSTHOOK: Input: default@v +#### A masked pattern was here #### +165 12 +27 12 +311 12 +97 12 +238 12 +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: create view v as select *, '12' from src +PREHOOK: type: CREATEVIEW +PREHOOK: Input: default@src +PREHOOK: Output: database:default +PREHOOK: Output: default@v +POSTHOOK: query: create view v as select *, '12' from src +POSTHOOK: type: CREATEVIEW +POSTHOOK: Input: default@src +POSTHOOK: Output: database:default +POSTHOOK: Output: default@v +PREHOOK: query: desc formatted v +PREHOOK: type: DESCTABLE +PREHOOK: Input: default@v +POSTHOOK: query: desc formatted v +POSTHOOK: type: DESCTABLE +POSTHOOK: Input: default@v +# col_name data_type comment + +key string +value string +_c1 string + +# Detailed Table Information +Database: default +#### A masked pattern was here #### +Retention: 0 +Table Type: VIRTUAL_VIEW +Table Parameters: +#### A masked pattern was here #### + +# Storage Information +SerDe Library: null +InputFormat: org.apache.hadoop.mapred.TextInputFormat +OutputFormat: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat +Compressed: No +Num Buckets: -1 +Bucket Columns: [] +Sort Columns: [] + +# View Information +View Original Text: select *, '12' from src +View Expanded Text: SELECT `key` AS `key`, `value` AS `value`, `_c1` AS `_c1` FROM (select *, '12' from `default`.`src`) `default.v` +PREHOOK: query: select * from v order by `_c1` limit 5 +PREHOOK: type: QUERY +PREHOOK: Input: default@src +PREHOOK: Input: default@v +#### A masked pattern was here #### +POSTHOOK: query: select * from v order by `_c1` limit 5 +POSTHOOK: type: QUERY +POSTHOOK: Input: default@src +POSTHOOK: Input: default@v +#### A masked pattern was here #### +165 val_165 12 +27 val_27 12 +311 val_311 12 +97 val_97 12 +238 val_238 12 +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: create view v as select *, '12' as `_c121` from src +PREHOOK: type: CREATEVIEW +PREHOOK: Input: default@src +PREHOOK: Output: database:default +PREHOOK: Output: default@v +POSTHOOK: query: create view v as select *, '12' as `_c121` from src +POSTHOOK: type: CREATEVIEW +POSTHOOK: Input: default@src +POSTHOOK: Output: database:default +POSTHOOK: Output: default@v +PREHOOK: query: desc formatted v +PREHOOK: type: DESCTABLE +PREHOOK: Input: default@v +POSTHOOK: query: desc formatted v +POSTHOOK: type: DESCTABLE +POSTHOOK: Input: default@v +# col_name data_type comment + +key string +value string +_c121 string + +# Detailed Table Information +Database: default +#### A masked pattern was here #### +Retention: 0 +Table Type: VIRTUAL_VIEW +Table Parameters: +#### A masked pattern was here #### + +# Storage Information +SerDe Library: null +InputFormat: org.apache.hadoop.mapred.TextInputFormat +OutputFormat: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat +Compressed: No +Num Buckets: -1 +Bucket Columns: [] +Sort Columns: [] + +# View Information +View Original Text: select *, '12' as _c121 from src +View Expanded Text: SELECT `key` AS `key`, `value` AS `value`, `_c121` AS `_c121` FROM (select *, '12' as `_c121` from `default`.`src`) `default.v` +PREHOOK: query: select * from v order by `_c121` limit 5 +PREHOOK: type: QUERY +PREHOOK: Input: default@src +PREHOOK: Input: default@v +#### A masked pattern was here #### +POSTHOOK: query: select * from v order by `_c121` limit 5 +POSTHOOK: type: QUERY +POSTHOOK: Input: default@src +POSTHOOK: Input: default@v +#### A masked pattern was here #### +165 val_165 12 +27 val_27 12 +311 val_311 12 +97 val_97 12 +238 val_238 12 +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: create view v as select key, count(*) from src group by key +PREHOOK: type: CREATEVIEW +PREHOOK: Input: default@src +PREHOOK: Output: database:default +PREHOOK: Output: default@v +POSTHOOK: query: create view v as select key, count(*) from src group by key +POSTHOOK: type: CREATEVIEW +POSTHOOK: Input: default@src +POSTHOOK: Output: database:default +POSTHOOK: Output: default@v +PREHOOK: query: desc formatted v +PREHOOK: type: DESCTABLE +PREHOOK: Input: default@v +POSTHOOK: query: desc formatted v +POSTHOOK: type: DESCTABLE +POSTHOOK: Input: default@v +# col_name data_type comment + +key string +_c1 bigint + +# Detailed Table Information +Database: default +#### A masked pattern was here #### +Retention: 0 +Table Type: VIRTUAL_VIEW +Table Parameters: +#### A masked pattern was here #### + +# Storage Information +SerDe Library: null +InputFormat: org.apache.hadoop.mapred.TextInputFormat +OutputFormat: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat +Compressed: No +Num Buckets: -1 +Bucket Columns: [] +Sort Columns: [] + +# View Information +View Original Text: select key, count(*) from src group by key +View Expanded Text: SELECT `key` AS `key`, `_c1` AS `_c1` FROM (select `src`.`key`, count(*) from `default`.`src` group by `src`.`key`) `default.v` +PREHOOK: query: select * from v order by `_c1` limit 5 +PREHOOK: type: QUERY +PREHOOK: Input: default@src +PREHOOK: Input: default@v +#### A masked pattern was here #### +POSTHOOK: query: select * from v order by `_c1` limit 5 +POSTHOOK: type: QUERY +POSTHOOK: Input: default@src +POSTHOOK: Input: default@v +#### A masked pattern was here #### +11 1 +105 1 +114 1 +96 1 +10 1