Author: omalley
Date: Wed Dec 11 00:39:43 2013
New Revision: 1550010
URL: http://svn.apache.org/r1550010
Log:
HIVE-5580. Predicate pushdown predicates with an and-operator between
non-SARGable predicates cause a NPE. (omalley)
Modified:
hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/io/sarg/SearchArgumentImpl.java
hive/trunk/ql/src/test/org/apache/hadoop/hive/ql/io/sarg/TestSearchArgumentImpl.java
hive/trunk/ql/src/test/queries/clientpositive/orc_create.q
hive/trunk/ql/src/test/results/clientpositive/orc_create.q.out
Modified:
hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/io/sarg/SearchArgumentImpl.java
URL:
http://svn.apache.org/viewvc/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/io/sarg/SearchArgumentImpl.java?rev=1550010&r1=1550009&r2=1550010&view=diff
==============================================================================
---
hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/io/sarg/SearchArgumentImpl.java
(original)
+++
hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/io/sarg/SearchArgumentImpl.java
Wed Dec 11 00:39:43 2013
@@ -573,7 +573,7 @@ final class SearchArgumentImpl implement
* @param expr The expression to clean up
* @return The cleaned up expression
*/
- ExpressionTree foldMaybe(ExpressionTree expr) {
+ static ExpressionTree foldMaybe(ExpressionTree expr) {
if (expr.children != null) {
for(int i=0; i < expr.children.size(); ++i) {
ExpressionTree child = foldMaybe(expr.children.get(i));
@@ -594,6 +594,9 @@ final class SearchArgumentImpl implement
expr.children.set(i, child);
}
}
+ if (expr.children.isEmpty()) {
+ return new ExpressionTree(TruthValue.YES_NO_NULL);
+ }
}
return expr;
}
Modified:
hive/trunk/ql/src/test/org/apache/hadoop/hive/ql/io/sarg/TestSearchArgumentImpl.java
URL:
http://svn.apache.org/viewvc/hive/trunk/ql/src/test/org/apache/hadoop/hive/ql/io/sarg/TestSearchArgumentImpl.java?rev=1550010&r1=1550009&r2=1550010&view=diff
==============================================================================
---
hive/trunk/ql/src/test/org/apache/hadoop/hive/ql/io/sarg/TestSearchArgumentImpl.java
(original)
+++
hive/trunk/ql/src/test/org/apache/hadoop/hive/ql/io/sarg/TestSearchArgumentImpl.java
Wed Dec 11 00:39:43 2013
@@ -147,6 +147,31 @@ public class TestSearchArgumentImpl {
}
@Test
+ public void testFoldMaybe() throws Exception {
+ assertEquals("(and leaf-1)",
+ ExpressionBuilder.foldMaybe(and(leaf(1),
+ constant(TruthValue.YES_NO_NULL))).toString());
+ assertEquals("(and leaf-1 leaf-2)",
+ ExpressionBuilder.foldMaybe(and(leaf(1),
+ constant(TruthValue.YES_NO_NULL), leaf(2))).toString());
+ assertEquals("(and leaf-1 leaf-2)",
+ ExpressionBuilder.foldMaybe(and(constant(TruthValue.YES_NO_NULL),
+ leaf(1), leaf(2), constant(TruthValue.YES_NO_NULL))).toString());
+ assertEquals("YES_NO_NULL",
+ ExpressionBuilder.foldMaybe(and(constant(TruthValue.YES_NO_NULL),
+ constant(TruthValue.YES_NO_NULL))).toString());
+ assertEquals("YES_NO_NULL",
+ ExpressionBuilder.foldMaybe(or(leaf(1),
+ constant(TruthValue.YES_NO_NULL))).toString());
+ assertEquals("(or leaf-1 (and leaf-2))",
+ ExpressionBuilder.foldMaybe(or(leaf(1),
+ and(leaf(2), constant(TruthValue.YES_NO_NULL)))).toString());
+ assertEquals("(and leaf-1)",
+ ExpressionBuilder.foldMaybe(and(or(leaf(2),
+ constant(TruthValue.YES_NO_NULL)), leaf(1))).toString());
+ }
+
+ @Test
public void testCNF() throws Exception {
assertEquals("leaf-1", ExpressionBuilder.convertToCNF(leaf(1)).toString());
assertEquals("NO", ExpressionBuilder.convertToCNF(
Modified: hive/trunk/ql/src/test/queries/clientpositive/orc_create.q
URL:
http://svn.apache.org/viewvc/hive/trunk/ql/src/test/queries/clientpositive/orc_create.q?rev=1550010&r1=1550009&r2=1550010&view=diff
==============================================================================
--- hive/trunk/ql/src/test/queries/clientpositive/orc_create.q (original)
+++ hive/trunk/ql/src/test/queries/clientpositive/orc_create.q Wed Dec 11
00:39:43 2013
@@ -92,6 +92,15 @@ SET hive.optimize.index.filter=true;
-- test predicate push down with partition pruning
SELECT COUNT(*) FROM orc_create_people where id < 10 and state = 'Ca';
+-- test predicate push down
+SELECT COUNT(*) FROM orc_create_people where id = 50;
+SELECT COUNT(*) FROM orc_create_people where id between 10 and 20;
+SELECT COUNT(*) FROM orc_create_people where id > 10 and id < 100;
+SELECT COUNT(*) FROM orc_create_people where (id + 1) = 20;
+SELECT COUNT(*) FROM orc_create_people where (id + 10) < 200;
+SELECT COUNT(*) FROM orc_create_people where id < 30 or first_name = "Rafael";
+SELECT COUNT(*) FROM orc_create_people where length(substr(first_name, 1, 2))
<= 2 and last_name like '%';
+
-- test predicate push down with no column projection
SELECT id, first_name, last_name, address
FROM orc_create_people WHERE id > 90;
Modified: hive/trunk/ql/src/test/results/clientpositive/orc_create.q.out
URL:
http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/orc_create.q.out?rev=1550010&r1=1550009&r2=1550010&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/orc_create.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/orc_create.q.out Wed Dec 11
00:39:43 2013
@@ -506,6 +506,183 @@ POSTHOOK: Lineage: orc_create_people PAR
POSTHOOK: Lineage: orc_create_people PARTITION(state=Or).id SIMPLE
[(orc_create_people_staging)orc_create_people_staging.FieldSchema(name:id,
type:int, comment:null), ]
POSTHOOK: Lineage: orc_create_people PARTITION(state=Or).last_name SIMPLE
[(orc_create_people_staging)orc_create_people_staging.FieldSchema(name:last_name,
type:string, comment:null), ]
5
+PREHOOK: query: -- test predicate push down
+SELECT COUNT(*) FROM orc_create_people where id = 50
+PREHOOK: type: QUERY
+PREHOOK: Input: default@orc_create_people
+PREHOOK: Input: default@orc_create_people@state=Ca
+PREHOOK: Input: default@orc_create_people@state=Or
+#### A masked pattern was here ####
+POSTHOOK: query: -- test predicate push down
+SELECT COUNT(*) FROM orc_create_people where id = 50
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@orc_create_people
+POSTHOOK: Input: default@orc_create_people@state=Ca
+POSTHOOK: Input: default@orc_create_people@state=Or
+#### A masked pattern was here ####
+POSTHOOK: Lineage: orc_create_complex.lst SIMPLE
[(orc_create_staging)orc_create_staging.FieldSchema(name:lst,
type:array<string>, comment:null), ]
+POSTHOOK: Lineage: orc_create_complex.mp SIMPLE
[(orc_create_staging)orc_create_staging.FieldSchema(name:mp,
type:map<string,string>, comment:null), ]
+POSTHOOK: Lineage: orc_create_complex.str SIMPLE
[(orc_create_staging)orc_create_staging.FieldSchema(name:str, type:string,
comment:null), ]
+POSTHOOK: Lineage: orc_create_complex.strct SIMPLE
[(orc_create_staging)orc_create_staging.FieldSchema(name:strct,
type:struct<A:string,B:string>, comment:null), ]
+POSTHOOK: Lineage: orc_create_people PARTITION(state=Ca).address SIMPLE
[(orc_create_people_staging)orc_create_people_staging.FieldSchema(name:address,
type:string, comment:null), ]
+POSTHOOK: Lineage: orc_create_people PARTITION(state=Ca).first_name SIMPLE
[(orc_create_people_staging)orc_create_people_staging.FieldSchema(name:first_name,
type:string, comment:null), ]
+POSTHOOK: Lineage: orc_create_people PARTITION(state=Ca).id SIMPLE
[(orc_create_people_staging)orc_create_people_staging.FieldSchema(name:id,
type:int, comment:null), ]
+POSTHOOK: Lineage: orc_create_people PARTITION(state=Ca).last_name SIMPLE
[(orc_create_people_staging)orc_create_people_staging.FieldSchema(name:last_name,
type:string, comment:null), ]
+POSTHOOK: Lineage: orc_create_people PARTITION(state=Or).address SIMPLE
[(orc_create_people_staging)orc_create_people_staging.FieldSchema(name:address,
type:string, comment:null), ]
+POSTHOOK: Lineage: orc_create_people PARTITION(state=Or).first_name SIMPLE
[(orc_create_people_staging)orc_create_people_staging.FieldSchema(name:first_name,
type:string, comment:null), ]
+POSTHOOK: Lineage: orc_create_people PARTITION(state=Or).id SIMPLE
[(orc_create_people_staging)orc_create_people_staging.FieldSchema(name:id,
type:int, comment:null), ]
+POSTHOOK: Lineage: orc_create_people PARTITION(state=Or).last_name SIMPLE
[(orc_create_people_staging)orc_create_people_staging.FieldSchema(name:last_name,
type:string, comment:null), ]
+1
+PREHOOK: query: SELECT COUNT(*) FROM orc_create_people where id between 10 and
20
+PREHOOK: type: QUERY
+PREHOOK: Input: default@orc_create_people
+PREHOOK: Input: default@orc_create_people@state=Ca
+PREHOOK: Input: default@orc_create_people@state=Or
+#### A masked pattern was here ####
+POSTHOOK: query: SELECT COUNT(*) FROM orc_create_people where id between 10
and 20
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@orc_create_people
+POSTHOOK: Input: default@orc_create_people@state=Ca
+POSTHOOK: Input: default@orc_create_people@state=Or
+#### A masked pattern was here ####
+POSTHOOK: Lineage: orc_create_complex.lst SIMPLE
[(orc_create_staging)orc_create_staging.FieldSchema(name:lst,
type:array<string>, comment:null), ]
+POSTHOOK: Lineage: orc_create_complex.mp SIMPLE
[(orc_create_staging)orc_create_staging.FieldSchema(name:mp,
type:map<string,string>, comment:null), ]
+POSTHOOK: Lineage: orc_create_complex.str SIMPLE
[(orc_create_staging)orc_create_staging.FieldSchema(name:str, type:string,
comment:null), ]
+POSTHOOK: Lineage: orc_create_complex.strct SIMPLE
[(orc_create_staging)orc_create_staging.FieldSchema(name:strct,
type:struct<A:string,B:string>, comment:null), ]
+POSTHOOK: Lineage: orc_create_people PARTITION(state=Ca).address SIMPLE
[(orc_create_people_staging)orc_create_people_staging.FieldSchema(name:address,
type:string, comment:null), ]
+POSTHOOK: Lineage: orc_create_people PARTITION(state=Ca).first_name SIMPLE
[(orc_create_people_staging)orc_create_people_staging.FieldSchema(name:first_name,
type:string, comment:null), ]
+POSTHOOK: Lineage: orc_create_people PARTITION(state=Ca).id SIMPLE
[(orc_create_people_staging)orc_create_people_staging.FieldSchema(name:id,
type:int, comment:null), ]
+POSTHOOK: Lineage: orc_create_people PARTITION(state=Ca).last_name SIMPLE
[(orc_create_people_staging)orc_create_people_staging.FieldSchema(name:last_name,
type:string, comment:null), ]
+POSTHOOK: Lineage: orc_create_people PARTITION(state=Or).address SIMPLE
[(orc_create_people_staging)orc_create_people_staging.FieldSchema(name:address,
type:string, comment:null), ]
+POSTHOOK: Lineage: orc_create_people PARTITION(state=Or).first_name SIMPLE
[(orc_create_people_staging)orc_create_people_staging.FieldSchema(name:first_name,
type:string, comment:null), ]
+POSTHOOK: Lineage: orc_create_people PARTITION(state=Or).id SIMPLE
[(orc_create_people_staging)orc_create_people_staging.FieldSchema(name:id,
type:int, comment:null), ]
+POSTHOOK: Lineage: orc_create_people PARTITION(state=Or).last_name SIMPLE
[(orc_create_people_staging)orc_create_people_staging.FieldSchema(name:last_name,
type:string, comment:null), ]
+11
+PREHOOK: query: SELECT COUNT(*) FROM orc_create_people where id > 10 and id <
100
+PREHOOK: type: QUERY
+PREHOOK: Input: default@orc_create_people
+PREHOOK: Input: default@orc_create_people@state=Ca
+PREHOOK: Input: default@orc_create_people@state=Or
+#### A masked pattern was here ####
+POSTHOOK: query: SELECT COUNT(*) FROM orc_create_people where id > 10 and id <
100
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@orc_create_people
+POSTHOOK: Input: default@orc_create_people@state=Ca
+POSTHOOK: Input: default@orc_create_people@state=Or
+#### A masked pattern was here ####
+POSTHOOK: Lineage: orc_create_complex.lst SIMPLE
[(orc_create_staging)orc_create_staging.FieldSchema(name:lst,
type:array<string>, comment:null), ]
+POSTHOOK: Lineage: orc_create_complex.mp SIMPLE
[(orc_create_staging)orc_create_staging.FieldSchema(name:mp,
type:map<string,string>, comment:null), ]
+POSTHOOK: Lineage: orc_create_complex.str SIMPLE
[(orc_create_staging)orc_create_staging.FieldSchema(name:str, type:string,
comment:null), ]
+POSTHOOK: Lineage: orc_create_complex.strct SIMPLE
[(orc_create_staging)orc_create_staging.FieldSchema(name:strct,
type:struct<A:string,B:string>, comment:null), ]
+POSTHOOK: Lineage: orc_create_people PARTITION(state=Ca).address SIMPLE
[(orc_create_people_staging)orc_create_people_staging.FieldSchema(name:address,
type:string, comment:null), ]
+POSTHOOK: Lineage: orc_create_people PARTITION(state=Ca).first_name SIMPLE
[(orc_create_people_staging)orc_create_people_staging.FieldSchema(name:first_name,
type:string, comment:null), ]
+POSTHOOK: Lineage: orc_create_people PARTITION(state=Ca).id SIMPLE
[(orc_create_people_staging)orc_create_people_staging.FieldSchema(name:id,
type:int, comment:null), ]
+POSTHOOK: Lineage: orc_create_people PARTITION(state=Ca).last_name SIMPLE
[(orc_create_people_staging)orc_create_people_staging.FieldSchema(name:last_name,
type:string, comment:null), ]
+POSTHOOK: Lineage: orc_create_people PARTITION(state=Or).address SIMPLE
[(orc_create_people_staging)orc_create_people_staging.FieldSchema(name:address,
type:string, comment:null), ]
+POSTHOOK: Lineage: orc_create_people PARTITION(state=Or).first_name SIMPLE
[(orc_create_people_staging)orc_create_people_staging.FieldSchema(name:first_name,
type:string, comment:null), ]
+POSTHOOK: Lineage: orc_create_people PARTITION(state=Or).id SIMPLE
[(orc_create_people_staging)orc_create_people_staging.FieldSchema(name:id,
type:int, comment:null), ]
+POSTHOOK: Lineage: orc_create_people PARTITION(state=Or).last_name SIMPLE
[(orc_create_people_staging)orc_create_people_staging.FieldSchema(name:last_name,
type:string, comment:null), ]
+89
+PREHOOK: query: SELECT COUNT(*) FROM orc_create_people where (id + 1) = 20
+PREHOOK: type: QUERY
+PREHOOK: Input: default@orc_create_people
+PREHOOK: Input: default@orc_create_people@state=Ca
+PREHOOK: Input: default@orc_create_people@state=Or
+#### A masked pattern was here ####
+POSTHOOK: query: SELECT COUNT(*) FROM orc_create_people where (id + 1) = 20
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@orc_create_people
+POSTHOOK: Input: default@orc_create_people@state=Ca
+POSTHOOK: Input: default@orc_create_people@state=Or
+#### A masked pattern was here ####
+POSTHOOK: Lineage: orc_create_complex.lst SIMPLE
[(orc_create_staging)orc_create_staging.FieldSchema(name:lst,
type:array<string>, comment:null), ]
+POSTHOOK: Lineage: orc_create_complex.mp SIMPLE
[(orc_create_staging)orc_create_staging.FieldSchema(name:mp,
type:map<string,string>, comment:null), ]
+POSTHOOK: Lineage: orc_create_complex.str SIMPLE
[(orc_create_staging)orc_create_staging.FieldSchema(name:str, type:string,
comment:null), ]
+POSTHOOK: Lineage: orc_create_complex.strct SIMPLE
[(orc_create_staging)orc_create_staging.FieldSchema(name:strct,
type:struct<A:string,B:string>, comment:null), ]
+POSTHOOK: Lineage: orc_create_people PARTITION(state=Ca).address SIMPLE
[(orc_create_people_staging)orc_create_people_staging.FieldSchema(name:address,
type:string, comment:null), ]
+POSTHOOK: Lineage: orc_create_people PARTITION(state=Ca).first_name SIMPLE
[(orc_create_people_staging)orc_create_people_staging.FieldSchema(name:first_name,
type:string, comment:null), ]
+POSTHOOK: Lineage: orc_create_people PARTITION(state=Ca).id SIMPLE
[(orc_create_people_staging)orc_create_people_staging.FieldSchema(name:id,
type:int, comment:null), ]
+POSTHOOK: Lineage: orc_create_people PARTITION(state=Ca).last_name SIMPLE
[(orc_create_people_staging)orc_create_people_staging.FieldSchema(name:last_name,
type:string, comment:null), ]
+POSTHOOK: Lineage: orc_create_people PARTITION(state=Or).address SIMPLE
[(orc_create_people_staging)orc_create_people_staging.FieldSchema(name:address,
type:string, comment:null), ]
+POSTHOOK: Lineage: orc_create_people PARTITION(state=Or).first_name SIMPLE
[(orc_create_people_staging)orc_create_people_staging.FieldSchema(name:first_name,
type:string, comment:null), ]
+POSTHOOK: Lineage: orc_create_people PARTITION(state=Or).id SIMPLE
[(orc_create_people_staging)orc_create_people_staging.FieldSchema(name:id,
type:int, comment:null), ]
+POSTHOOK: Lineage: orc_create_people PARTITION(state=Or).last_name SIMPLE
[(orc_create_people_staging)orc_create_people_staging.FieldSchema(name:last_name,
type:string, comment:null), ]
+1
+PREHOOK: query: SELECT COUNT(*) FROM orc_create_people where (id + 10) < 200
+PREHOOK: type: QUERY
+PREHOOK: Input: default@orc_create_people
+PREHOOK: Input: default@orc_create_people@state=Ca
+PREHOOK: Input: default@orc_create_people@state=Or
+#### A masked pattern was here ####
+POSTHOOK: query: SELECT COUNT(*) FROM orc_create_people where (id + 10) < 200
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@orc_create_people
+POSTHOOK: Input: default@orc_create_people@state=Ca
+POSTHOOK: Input: default@orc_create_people@state=Or
+#### A masked pattern was here ####
+POSTHOOK: Lineage: orc_create_complex.lst SIMPLE
[(orc_create_staging)orc_create_staging.FieldSchema(name:lst,
type:array<string>, comment:null), ]
+POSTHOOK: Lineage: orc_create_complex.mp SIMPLE
[(orc_create_staging)orc_create_staging.FieldSchema(name:mp,
type:map<string,string>, comment:null), ]
+POSTHOOK: Lineage: orc_create_complex.str SIMPLE
[(orc_create_staging)orc_create_staging.FieldSchema(name:str, type:string,
comment:null), ]
+POSTHOOK: Lineage: orc_create_complex.strct SIMPLE
[(orc_create_staging)orc_create_staging.FieldSchema(name:strct,
type:struct<A:string,B:string>, comment:null), ]
+POSTHOOK: Lineage: orc_create_people PARTITION(state=Ca).address SIMPLE
[(orc_create_people_staging)orc_create_people_staging.FieldSchema(name:address,
type:string, comment:null), ]
+POSTHOOK: Lineage: orc_create_people PARTITION(state=Ca).first_name SIMPLE
[(orc_create_people_staging)orc_create_people_staging.FieldSchema(name:first_name,
type:string, comment:null), ]
+POSTHOOK: Lineage: orc_create_people PARTITION(state=Ca).id SIMPLE
[(orc_create_people_staging)orc_create_people_staging.FieldSchema(name:id,
type:int, comment:null), ]
+POSTHOOK: Lineage: orc_create_people PARTITION(state=Ca).last_name SIMPLE
[(orc_create_people_staging)orc_create_people_staging.FieldSchema(name:last_name,
type:string, comment:null), ]
+POSTHOOK: Lineage: orc_create_people PARTITION(state=Or).address SIMPLE
[(orc_create_people_staging)orc_create_people_staging.FieldSchema(name:address,
type:string, comment:null), ]
+POSTHOOK: Lineage: orc_create_people PARTITION(state=Or).first_name SIMPLE
[(orc_create_people_staging)orc_create_people_staging.FieldSchema(name:first_name,
type:string, comment:null), ]
+POSTHOOK: Lineage: orc_create_people PARTITION(state=Or).id SIMPLE
[(orc_create_people_staging)orc_create_people_staging.FieldSchema(name:id,
type:int, comment:null), ]
+POSTHOOK: Lineage: orc_create_people PARTITION(state=Or).last_name SIMPLE
[(orc_create_people_staging)orc_create_people_staging.FieldSchema(name:last_name,
type:string, comment:null), ]
+100
+PREHOOK: query: SELECT COUNT(*) FROM orc_create_people where id < 30 or
first_name = "Rafael"
+PREHOOK: type: QUERY
+PREHOOK: Input: default@orc_create_people
+PREHOOK: Input: default@orc_create_people@state=Ca
+PREHOOK: Input: default@orc_create_people@state=Or
+#### A masked pattern was here ####
+POSTHOOK: query: SELECT COUNT(*) FROM orc_create_people where id < 30 or
first_name = "Rafael"
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@orc_create_people
+POSTHOOK: Input: default@orc_create_people@state=Ca
+POSTHOOK: Input: default@orc_create_people@state=Or
+#### A masked pattern was here ####
+POSTHOOK: Lineage: orc_create_complex.lst SIMPLE
[(orc_create_staging)orc_create_staging.FieldSchema(name:lst,
type:array<string>, comment:null), ]
+POSTHOOK: Lineage: orc_create_complex.mp SIMPLE
[(orc_create_staging)orc_create_staging.FieldSchema(name:mp,
type:map<string,string>, comment:null), ]
+POSTHOOK: Lineage: orc_create_complex.str SIMPLE
[(orc_create_staging)orc_create_staging.FieldSchema(name:str, type:string,
comment:null), ]
+POSTHOOK: Lineage: orc_create_complex.strct SIMPLE
[(orc_create_staging)orc_create_staging.FieldSchema(name:strct,
type:struct<A:string,B:string>, comment:null), ]
+POSTHOOK: Lineage: orc_create_people PARTITION(state=Ca).address SIMPLE
[(orc_create_people_staging)orc_create_people_staging.FieldSchema(name:address,
type:string, comment:null), ]
+POSTHOOK: Lineage: orc_create_people PARTITION(state=Ca).first_name SIMPLE
[(orc_create_people_staging)orc_create_people_staging.FieldSchema(name:first_name,
type:string, comment:null), ]
+POSTHOOK: Lineage: orc_create_people PARTITION(state=Ca).id SIMPLE
[(orc_create_people_staging)orc_create_people_staging.FieldSchema(name:id,
type:int, comment:null), ]
+POSTHOOK: Lineage: orc_create_people PARTITION(state=Ca).last_name SIMPLE
[(orc_create_people_staging)orc_create_people_staging.FieldSchema(name:last_name,
type:string, comment:null), ]
+POSTHOOK: Lineage: orc_create_people PARTITION(state=Or).address SIMPLE
[(orc_create_people_staging)orc_create_people_staging.FieldSchema(name:address,
type:string, comment:null), ]
+POSTHOOK: Lineage: orc_create_people PARTITION(state=Or).first_name SIMPLE
[(orc_create_people_staging)orc_create_people_staging.FieldSchema(name:first_name,
type:string, comment:null), ]
+POSTHOOK: Lineage: orc_create_people PARTITION(state=Or).id SIMPLE
[(orc_create_people_staging)orc_create_people_staging.FieldSchema(name:id,
type:int, comment:null), ]
+POSTHOOK: Lineage: orc_create_people PARTITION(state=Or).last_name SIMPLE
[(orc_create_people_staging)orc_create_people_staging.FieldSchema(name:last_name,
type:string, comment:null), ]
+30
+PREHOOK: query: SELECT COUNT(*) FROM orc_create_people where
length(substr(first_name, 1, 2)) <= 2 and last_name like '%'
+PREHOOK: type: QUERY
+PREHOOK: Input: default@orc_create_people
+PREHOOK: Input: default@orc_create_people@state=Ca
+PREHOOK: Input: default@orc_create_people@state=Or
+#### A masked pattern was here ####
+POSTHOOK: query: SELECT COUNT(*) FROM orc_create_people where
length(substr(first_name, 1, 2)) <= 2 and last_name like '%'
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@orc_create_people
+POSTHOOK: Input: default@orc_create_people@state=Ca
+POSTHOOK: Input: default@orc_create_people@state=Or
+#### A masked pattern was here ####
+POSTHOOK: Lineage: orc_create_complex.lst SIMPLE
[(orc_create_staging)orc_create_staging.FieldSchema(name:lst,
type:array<string>, comment:null), ]
+POSTHOOK: Lineage: orc_create_complex.mp SIMPLE
[(orc_create_staging)orc_create_staging.FieldSchema(name:mp,
type:map<string,string>, comment:null), ]
+POSTHOOK: Lineage: orc_create_complex.str SIMPLE
[(orc_create_staging)orc_create_staging.FieldSchema(name:str, type:string,
comment:null), ]
+POSTHOOK: Lineage: orc_create_complex.strct SIMPLE
[(orc_create_staging)orc_create_staging.FieldSchema(name:strct,
type:struct<A:string,B:string>, comment:null), ]
+POSTHOOK: Lineage: orc_create_people PARTITION(state=Ca).address SIMPLE
[(orc_create_people_staging)orc_create_people_staging.FieldSchema(name:address,
type:string, comment:null), ]
+POSTHOOK: Lineage: orc_create_people PARTITION(state=Ca).first_name SIMPLE
[(orc_create_people_staging)orc_create_people_staging.FieldSchema(name:first_name,
type:string, comment:null), ]
+POSTHOOK: Lineage: orc_create_people PARTITION(state=Ca).id SIMPLE
[(orc_create_people_staging)orc_create_people_staging.FieldSchema(name:id,
type:int, comment:null), ]
+POSTHOOK: Lineage: orc_create_people PARTITION(state=Ca).last_name SIMPLE
[(orc_create_people_staging)orc_create_people_staging.FieldSchema(name:last_name,
type:string, comment:null), ]
+POSTHOOK: Lineage: orc_create_people PARTITION(state=Or).address SIMPLE
[(orc_create_people_staging)orc_create_people_staging.FieldSchema(name:address,
type:string, comment:null), ]
+POSTHOOK: Lineage: orc_create_people PARTITION(state=Or).first_name SIMPLE
[(orc_create_people_staging)orc_create_people_staging.FieldSchema(name:first_name,
type:string, comment:null), ]
+POSTHOOK: Lineage: orc_create_people PARTITION(state=Or).id SIMPLE
[(orc_create_people_staging)orc_create_people_staging.FieldSchema(name:id,
type:int, comment:null), ]
+POSTHOOK: Lineage: orc_create_people PARTITION(state=Or).last_name SIMPLE
[(orc_create_people_staging)orc_create_people_staging.FieldSchema(name:last_name,
type:string, comment:null), ]
+100
PREHOOK: query: -- test predicate push down with no column projection
SELECT id, first_name, last_name, address
FROM orc_create_people WHERE id > 90