http://git-wip-us.apache.org/repos/asf/hive/blob/6f5c1135/ql/src/test/results/clientpositive/cbo_rp_limit.q.out ---------------------------------------------------------------------- diff --git a/ql/src/test/results/clientpositive/cbo_rp_limit.q.out b/ql/src/test/results/clientpositive/cbo_rp_limit.q.out deleted file mode 100644 index 13df214..0000000 --- a/ql/src/test/results/clientpositive/cbo_rp_limit.q.out +++ /dev/null @@ -1,90 +0,0 @@ -PREHOOK: query: -- 7. Test Select + TS + Join + Fil + GB + GB Having + Limit -select key, (c_int+1)+2 as x, sum(c_int) from cbo_t1 group by c_float, cbo_t1.c_int, key order by x limit 1 -PREHOOK: type: QUERY -PREHOOK: Input: default@cbo_t1 -PREHOOK: Input: default@cbo_t1@dt=2014 -#### A masked pattern was here #### -POSTHOOK: query: -- 7. Test Select + TS + Join + Fil + GB + GB Having + Limit -select key, (c_int+1)+2 as x, sum(c_int) from cbo_t1 group by c_float, cbo_t1.c_int, key order by x limit 1 -POSTHOOK: type: QUERY -POSTHOOK: Input: default@cbo_t1 -POSTHOOK: Input: default@cbo_t1@dt=2014 -#### A masked pattern was here #### -NULL NULL NULL -PREHOOK: query: select x, y, count(*) from (select key, (c_int+c_float+1+2) as x, sum(c_int) as y from cbo_t1 group by c_float, cbo_t1.c_int, key) R group by y, x order by x,y limit 1 -PREHOOK: type: QUERY -PREHOOK: Input: default@cbo_t1 -PREHOOK: Input: default@cbo_t1@dt=2014 -#### A masked pattern was here #### -POSTHOOK: query: select x, y, count(*) from (select key, (c_int+c_float+1+2) as x, sum(c_int) as y from cbo_t1 group by c_float, cbo_t1.c_int, key) R group by y, x order by x,y limit 1 -POSTHOOK: type: QUERY -POSTHOOK: Input: default@cbo_t1 -POSTHOOK: Input: default@cbo_t1@dt=2014 -#### A masked pattern was here #### -NULL NULL 1 -PREHOOK: query: select key from(select key from (select key from cbo_t1 limit 5)cbo_t2 limit 5)cbo_t3 limit 5 -PREHOOK: type: QUERY -PREHOOK: Input: default@cbo_t1 -PREHOOK: Input: default@cbo_t1@dt=2014 -#### A masked pattern was here #### -POSTHOOK: query: select key from(select key from (select key from cbo_t1 limit 5)cbo_t2 limit 5)cbo_t3 limit 5 -POSTHOOK: type: QUERY -POSTHOOK: Input: default@cbo_t1 -POSTHOOK: Input: default@cbo_t1@dt=2014 -#### A masked pattern was here #### -1 -1 -1 -1 -1 -PREHOOK: query: select key, c_int from(select key, c_int from (select key, c_int from cbo_t1 order by c_int limit 5)cbo_t1 order by c_int limit 5)cbo_t2 order by c_int limit 5 -PREHOOK: type: QUERY -PREHOOK: Input: default@cbo_t1 -PREHOOK: Input: default@cbo_t1@dt=2014 -#### A masked pattern was here #### -POSTHOOK: query: select key, c_int from(select key, c_int from (select key, c_int from cbo_t1 order by c_int limit 5)cbo_t1 order by c_int limit 5)cbo_t2 order by c_int limit 5 -POSTHOOK: type: QUERY -POSTHOOK: Input: default@cbo_t1 -POSTHOOK: Input: default@cbo_t1@dt=2014 -#### A masked pattern was here #### -NULL NULL -NULL NULL -1 1 -1 1 -1 1 -PREHOOK: query: select cbo_t3.c_int, c, count(*) from (select key as a, c_int+1 as b, sum(c_int) as c from cbo_t1 where (cbo_t1.c_int + 1 >= 0) and (cbo_t1.c_int > 0 or cbo_t1.c_float >= 0) group by c_float, cbo_t1.c_int, key order by a limit 5) cbo_t1 join (select key as p, c_int+1 as q, sum(c_int) as r from cbo_t2 where (cbo_t2.c_int + 1 >= 0) and (cbo_t2.c_int > 0 or cbo_t2.c_float >= 0) group by c_float, cbo_t2.c_int, key order by q/10 desc, r asc limit 5) cbo_t2 on cbo_t1.a=p join cbo_t3 on cbo_t1.a=key where (b + cbo_t2.q >= 0) and (b > 0 or c_int >= 0) group by cbo_t3.c_int, c order by cbo_t3.c_int+c desc, c limit 5 -PREHOOK: type: QUERY -PREHOOK: Input: default@cbo_t1 -PREHOOK: Input: default@cbo_t1@dt=2014 -PREHOOK: Input: default@cbo_t2 -PREHOOK: Input: default@cbo_t2@dt=2014 -PREHOOK: Input: default@cbo_t3 -#### A masked pattern was here #### -POSTHOOK: query: select cbo_t3.c_int, c, count(*) from (select key as a, c_int+1 as b, sum(c_int) as c from cbo_t1 where (cbo_t1.c_int + 1 >= 0) and (cbo_t1.c_int > 0 or cbo_t1.c_float >= 0) group by c_float, cbo_t1.c_int, key order by a limit 5) cbo_t1 join (select key as p, c_int+1 as q, sum(c_int) as r from cbo_t2 where (cbo_t2.c_int + 1 >= 0) and (cbo_t2.c_int > 0 or cbo_t2.c_float >= 0) group by c_float, cbo_t2.c_int, key order by q/10 desc, r asc limit 5) cbo_t2 on cbo_t1.a=p join cbo_t3 on cbo_t1.a=key where (b + cbo_t2.q >= 0) and (b > 0 or c_int >= 0) group by cbo_t3.c_int, c order by cbo_t3.c_int+c desc, c limit 5 -POSTHOOK: type: QUERY -POSTHOOK: Input: default@cbo_t1 -POSTHOOK: Input: default@cbo_t1@dt=2014 -POSTHOOK: Input: default@cbo_t2 -POSTHOOK: Input: default@cbo_t2@dt=2014 -POSTHOOK: Input: default@cbo_t3 -#### A masked pattern was here #### -1 12 6 -1 2 6 -PREHOOK: query: select cbo_t3.c_int, c, count(*) from (select key as a, c_int+1 as b, sum(c_int) as c from cbo_t1 where (cbo_t1.c_int + 1 >= 0) and (cbo_t1.c_int > 0 or cbo_t1.c_float >= 0) group by c_float, cbo_t1.c_int, key having cbo_t1.c_float > 0 and (c_int >=1 or c_float >= 1) and (c_int + c_float) >= 0 order by b % c asc, b desc limit 5) cbo_t1 left outer join (select key as p, c_int+1 as q, sum(c_int) as r from cbo_t2 where (cbo_t2.c_int + 1 >= 0) and (cbo_t2.c_int > 0 or cbo_t2.c_float >= 0) group by c_float, cbo_t2.c_int, key having cbo_t2.c_float > 0 and (c_int >=1 or c_float >= 1) and (c_int + c_float) >= 0 limit 5) cbo_t2 on cbo_t1.a=p left outer join cbo_t3 on cbo_t1.a=key where (b + cbo_t2.q >= 0) and (b > 0 or c_int >= 0) group by cbo_t3.c_int, c having cbo_t3.c_int > 0 and (c_int >=1 or c >= 1) and (c_int + c) >= 0 order by cbo_t3.c_int % c asc, cbo_t3.c_int, c desc limit 5 -PREHOOK: type: QUERY -PREHOOK: Input: default@cbo_t1 -PREHOOK: Input: default@cbo_t1@dt=2014 -PREHOOK: Input: default@cbo_t2 -PREHOOK: Input: default@cbo_t2@dt=2014 -PREHOOK: Input: default@cbo_t3 -#### A masked pattern was here #### -POSTHOOK: query: select cbo_t3.c_int, c, count(*) from (select key as a, c_int+1 as b, sum(c_int) as c from cbo_t1 where (cbo_t1.c_int + 1 >= 0) and (cbo_t1.c_int > 0 or cbo_t1.c_float >= 0) group by c_float, cbo_t1.c_int, key having cbo_t1.c_float > 0 and (c_int >=1 or c_float >= 1) and (c_int + c_float) >= 0 order by b % c asc, b desc limit 5) cbo_t1 left outer join (select key as p, c_int+1 as q, sum(c_int) as r from cbo_t2 where (cbo_t2.c_int + 1 >= 0) and (cbo_t2.c_int > 0 or cbo_t2.c_float >= 0) group by c_float, cbo_t2.c_int, key having cbo_t2.c_float > 0 and (c_int >=1 or c_float >= 1) and (c_int + c_float) >= 0 limit 5) cbo_t2 on cbo_t1.a=p left outer join cbo_t3 on cbo_t1.a=key where (b + cbo_t2.q >= 0) and (b > 0 or c_int >= 0) group by cbo_t3.c_int, c having cbo_t3.c_int > 0 and (c_int >=1 or c >= 1) and (c_int + c) >= 0 order by cbo_t3.c_int % c asc, cbo_t3.c_int, c desc limit 5 -POSTHOOK: type: QUERY -POSTHOOK: Input: default@cbo_t1 -POSTHOOK: Input: default@cbo_t1@dt=2014 -POSTHOOK: Input: default@cbo_t2 -POSTHOOK: Input: default@cbo_t2@dt=2014 -POSTHOOK: Input: default@cbo_t3 -#### A masked pattern was here #### -1 12 6 -1 2 6
http://git-wip-us.apache.org/repos/asf/hive/blob/6f5c1135/ql/src/test/results/clientpositive/cbo_rp_lineage2.q.out ---------------------------------------------------------------------- diff --git a/ql/src/test/results/clientpositive/cbo_rp_lineage2.q.out b/ql/src/test/results/clientpositive/cbo_rp_lineage2.q.out deleted file mode 100644 index 128ed83..0000000 --- a/ql/src/test/results/clientpositive/cbo_rp_lineage2.q.out +++ /dev/null @@ -1,675 +0,0 @@ -PREHOOK: query: drop table if exists src2 -PREHOOK: type: DROPTABLE -PREHOOK: query: create table src2 as select key key2, value value2 from src1 -PREHOOK: type: CREATETABLE_AS_SELECT -PREHOOK: Input: default@src1 -PREHOOK: Output: database:default -PREHOOK: Output: default@src2 -{"version":"1.0","engine":"mr","database":"default","hash":"3a39d46286e4c2cd2139c9bb248f7b4f","queryText":"create table src2 as select key key2, value value2 from src1","edges":[{"sources":[2],"targets":[0],"edgeType":"PROJECTION"},{"sources":[3],"targets":[1],"edgeType":"PROJECTION"}],"vertices":[{"id":0,"vertexType":"COLUMN","vertexId":"default.src2.key2"},{"id":1,"vertexType":"COLUMN","vertexId":"default.src2.value2"},{"id":2,"vertexType":"COLUMN","vertexId":"default.src1.key"},{"id":3,"vertexType":"COLUMN","vertexId":"default.src1.value"}]} -PREHOOK: query: select * from src1 where key is not null and value is not null limit 3 -PREHOOK: type: QUERY -PREHOOK: Input: default@src1 -#### A masked pattern was here #### -{"version":"1.0","engine":"mr","database":"default","hash":"b5b224847b2333e790a2c229434a04c8","queryText":"select * from src1 where key is not null and value is not null limit 3","edges":[{"sources":[2],"targets":[0],"edgeType":"PROJECTION"},{"sources":[3],"targets":[1],"edgeType":"PROJECTION"},{"sources":[2,3],"targets":[0,1],"expression":"(src1.key is not null and src1.value is not null)","edgeType":"PREDICATE"}],"vertices":[{"id":0,"vertexType":"COLUMN","vertexId":"src1.key"},{"id":1,"vertexType":"COLUMN","vertexId":"src1.value"},{"id":2,"vertexType":"COLUMN","vertexId":"default.src1.key"},{"id":3,"vertexType":"COLUMN","vertexId":"default.src1.value"}]} -238 val_238 - -311 val_311 -PREHOOK: query: select * from src1 where key > 10 and value > 'val' order by key limit 5 -PREHOOK: type: QUERY -PREHOOK: Input: default@src1 -#### A masked pattern was here #### -{"version":"1.0","engine":"mr","database":"default","hash":"773d9d0ea92e797eae292ae1eeea11ab","queryText":"select * from src1 where key > 10 and value > 'val' order by key limit 5","edges":[{"sources":[2],"targets":[0],"edgeType":"PROJECTION"},{"sources":[3],"targets":[1],"edgeType":"PROJECTION"},{"sources":[2,3],"targets":[0,1],"expression":"((UDFToDouble(src1.key) > 10.0) and (src1.value > 'val'))","edgeType":"PREDICATE"}],"vertices":[{"id":0,"vertexType":"COLUMN","vertexId":"src1.key"},{"id":1,"vertexType":"COLUMN","vertexId":"src1.value"},{"id":2,"vertexType":"COLUMN","vertexId":"default.src1.key"},{"id":3,"vertexType":"COLUMN","vertexId":"default.src1.value"}]} -146 val_146 -150 val_150 -213 val_213 -238 val_238 -255 val_255 -PREHOOK: query: drop table if exists dest1 -PREHOOK: type: DROPTABLE -PREHOOK: query: create table dest1 as select * from src1 -PREHOOK: type: CREATETABLE_AS_SELECT -PREHOOK: Input: default@src1 -PREHOOK: Output: database:default -PREHOOK: Output: default@dest1 -{"version":"1.0","engine":"mr","database":"default","hash":"712fe958c357bcfc978b95c43eb19084","queryText":"create table dest1 as select * from src1","edges":[{"sources":[2],"targets":[0],"edgeType":"PROJECTION"},{"sources":[3],"targets":[1],"edgeType":"PROJECTION"}],"vertices":[{"id":0,"vertexType":"COLUMN","vertexId":"default.dest1.key"},{"id":1,"vertexType":"COLUMN","vertexId":"default.dest1.value"},{"id":2,"vertexType":"COLUMN","vertexId":"default.src1.key"},{"id":3,"vertexType":"COLUMN","vertexId":"default.src1.value"}]} -PREHOOK: query: insert into table dest1 select * from src2 -PREHOOK: type: QUERY -PREHOOK: Input: default@src2 -PREHOOK: Output: default@dest1 -{"version":"1.0","engine":"mr","database":"default","hash":"ecc718a966d8887b18084a55dd96f0bc","queryText":"insert into table dest1 select * from src2","edges":[{"sources":[2],"targets":[0],"edgeType":"PROJECTION"},{"sources":[3],"targets":[1],"edgeType":"PROJECTION"}],"vertices":[{"id":0,"vertexType":"COLUMN","vertexId":"default.dest1.key"},{"id":1,"vertexType":"COLUMN","vertexId":"default.dest1.value"},{"id":2,"vertexType":"COLUMN","vertexId":"default.src2.key2"},{"id":3,"vertexType":"COLUMN","vertexId":"default.src2.value2"}]} -PREHOOK: query: select key k, dest1.value from dest1 -PREHOOK: type: QUERY -PREHOOK: Input: default@dest1 -#### A masked pattern was here #### -{"version":"1.0","engine":"mr","database":"default","hash":"416b6f4cd63edd4f9d8213d2d7819d21","queryText":"select key k, dest1.value from dest1","edges":[{"sources":[2],"targets":[0],"edgeType":"PROJECTION"},{"sources":[3],"targets":[1],"edgeType":"PROJECTION"}],"vertices":[{"id":0,"vertexType":"COLUMN","vertexId":"k"},{"id":1,"vertexType":"COLUMN","vertexId":"dest1.value"},{"id":2,"vertexType":"COLUMN","vertexId":"default.dest1.key"},{"id":3,"vertexType":"COLUMN","vertexId":"default.dest1.value"}]} -238 val_238 - -311 val_311 - val_27 - val_165 - val_409 -255 val_255 -278 val_278 -98 val_98 - val_484 - val_265 - val_193 -401 val_401 -150 val_150 -273 val_273 -224 -369 -66 val_66 -128 -213 val_213 -146 val_146 -406 val_406 - - - -238 val_238 - -311 val_311 - val_27 - val_165 - val_409 -255 val_255 -278 val_278 -98 val_98 - val_484 - val_265 - val_193 -401 val_401 -150 val_150 -273 val_273 -224 -369 -66 val_66 -128 -213 val_213 -146 val_146 -406 val_406 - - - -PREHOOK: query: select key from src1 union select key2 from src2 order by key -PREHOOK: type: QUERY -PREHOOK: Input: default@src1 -PREHOOK: Input: default@src2 -#### A masked pattern was here #### -{"version":"1.0","engine":"mr","database":"default","hash":"50fa3d1074b3fda37ce11dc6ec92ebf3","queryText":"select key from src1 union select key2 from src2 order by key","edges":[{"sources":[1,2],"targets":[0],"expression":"KEY.reducesinkkey0","edgeType":"PROJECTION"}],"vertices":[{"id":0,"vertexType":"COLUMN","vertexId":"key"},{"id":1,"vertexType":"COLUMN","vertexId":"default.src1.key"},{"id":2,"vertexType":"COLUMN","vertexId":"default.src2.key2"}]} - -128 -146 -150 -213 -224 -238 -255 -273 -278 -311 -369 -401 -406 -66 -98 -PREHOOK: query: select key k from src1 union select key2 from src2 order by k -PREHOOK: type: QUERY -PREHOOK: Input: default@src1 -PREHOOK: Input: default@src2 -#### A masked pattern was here #### -{"version":"1.0","engine":"mr","database":"default","hash":"a739460bd79c8c91ec35e22c97329769","queryText":"select key k from src1 union select key2 from src2 order by k","edges":[{"sources":[1,2],"targets":[0],"expression":"KEY.reducesinkkey0","edgeType":"PROJECTION"}],"vertices":[{"id":0,"vertexType":"COLUMN","vertexId":"k"},{"id":1,"vertexType":"COLUMN","vertexId":"default.src1.key"},{"id":2,"vertexType":"COLUMN","vertexId":"default.src2.key2"}]} - -128 -146 -150 -213 -224 -238 -255 -273 -278 -311 -369 -401 -406 -66 -98 -PREHOOK: query: select key, count(1) a from dest1 group by key -PREHOOK: type: QUERY -PREHOOK: Input: default@dest1 -#### A masked pattern was here #### -{"version":"1.0","engine":"mr","database":"default","hash":"3901b5e3a164064736b3234355046340","queryText":"select key, count(1) a from dest1 group by key","edges":[],"vertices":[]} - 20 -128 2 -146 2 -150 2 -213 2 -224 2 -238 2 -255 2 -273 2 -278 2 -311 2 -369 2 -401 2 -406 2 -66 2 -98 2 -PREHOOK: query: select key k, count(*) from dest1 group by key -PREHOOK: type: QUERY -PREHOOK: Input: default@dest1 -#### A masked pattern was here #### -{"version":"1.0","engine":"mr","database":"default","hash":"0d5a212f10847aeaab31e8c31121e6d4","queryText":"select key k, count(*) from dest1 group by key","edges":[],"vertices":[]} - 20 -128 2 -146 2 -150 2 -213 2 -224 2 -238 2 -255 2 -273 2 -278 2 -311 2 -369 2 -401 2 -406 2 -66 2 -98 2 -PREHOOK: query: select key k, count(value) from dest1 group by key -PREHOOK: type: QUERY -PREHOOK: Input: default@dest1 -#### A masked pattern was here #### -{"version":"1.0","engine":"mr","database":"default","hash":"56429eccb04ded722f5bd9d9d8cf7260","queryText":"select key k, count(value) from dest1 group by key","edges":[],"vertices":[]} - 20 -128 2 -146 2 -150 2 -213 2 -224 2 -238 2 -255 2 -273 2 -278 2 -311 2 -369 2 -401 2 -406 2 -66 2 -98 2 -PREHOOK: query: select value, max(length(key)) from dest1 group by value -PREHOOK: type: QUERY -PREHOOK: Input: default@dest1 -#### A masked pattern was here #### -{"version":"1.0","engine":"mr","database":"default","hash":"7e1cfc3dece85b41b6f7c46365580cde","queryText":"select value, max(length(key)) from dest1 group by value","edges":[],"vertices":[]} - 3 -val_146 3 -val_150 3 -val_165 0 -val_193 0 -val_213 3 -val_238 3 -val_255 3 -val_265 0 -val_27 0 -val_273 3 -val_278 3 -val_311 3 -val_401 3 -val_406 3 -val_409 0 -val_484 0 -val_66 2 -val_98 2 -PREHOOK: query: select value, max(length(key)) from dest1 group by value order by value limit 5 -PREHOOK: type: QUERY -PREHOOK: Input: default@dest1 -#### A masked pattern was here #### -{"version":"1.0","engine":"mr","database":"default","hash":"c6578ce1dd72498c4af33f20f164e483","queryText":"select value, max(length(key)) from dest1 group by value order by value limit 5","edges":[{"sources":[2],"targets":[0],"edgeType":"PROJECTION"},{"sources":[3],"targets":[1],"expression":"max(length(dest1.key))","edgeType":"PROJECTION"}],"vertices":[{"id":0,"vertexType":"COLUMN","vertexId":"value"},{"id":1,"vertexType":"COLUMN","vertexId":"_c1"},{"id":2,"vertexType":"COLUMN","vertexId":"default.dest1.value"},{"id":3,"vertexType":"COLUMN","vertexId":"default.dest1.key"}]} - 3 -val_146 3 -val_150 3 -val_165 0 -val_193 0 -PREHOOK: query: select key, length(value) from dest1 -PREHOOK: type: QUERY -PREHOOK: Input: default@dest1 -#### A masked pattern was here #### -{"version":"1.0","engine":"mr","database":"default","hash":"91fbcea5cb34362071555cd93e8d0abe","queryText":"select key, length(value) from dest1","edges":[{"sources":[2],"targets":[0],"edgeType":"PROJECTION"},{"sources":[3],"targets":[1],"expression":"length(dest1.value)","edgeType":"PROJECTION"}],"vertices":[{"id":0,"vertexType":"COLUMN","vertexId":"key"},{"id":1,"vertexType":"COLUMN","vertexId":"_c1"},{"id":2,"vertexType":"COLUMN","vertexId":"default.dest1.key"},{"id":3,"vertexType":"COLUMN","vertexId":"default.dest1.value"}]} -238 7 - 0 -311 7 - 6 - 7 - 7 -255 7 -278 7 -98 6 - 7 - 7 - 7 -401 7 -150 7 -273 7 -224 0 -369 0 -66 6 -128 0 -213 7 -146 7 -406 7 - 0 - 0 - 0 -238 7 - 0 -311 7 - 6 - 7 - 7 -255 7 -278 7 -98 6 - 7 - 7 - 7 -401 7 -150 7 -273 7 -224 0 -369 0 -66 6 -128 0 -213 7 -146 7 -406 7 - 0 - 0 - 0 -PREHOOK: query: select length(value) + 3 from dest1 -PREHOOK: type: QUERY -PREHOOK: Input: default@dest1 -#### A masked pattern was here #### -{"version":"1.0","engine":"mr","database":"default","hash":"3d8a347cc9052111cb328938d37b9b03","queryText":"select length(value) + 3 from dest1","edges":[{"sources":[1],"targets":[0],"expression":"(length(dest1.value) + 3)","edgeType":"PROJECTION"}],"vertices":[{"id":0,"vertexType":"COLUMN","vertexId":"_c0"},{"id":1,"vertexType":"COLUMN","vertexId":"default.dest1.value"}]} -10 -3 -10 -9 -10 -10 -10 -10 -9 -10 -10 -10 -10 -10 -10 -3 -3 -9 -3 -10 -10 -10 -3 -3 -3 -10 -3 -10 -9 -10 -10 -10 -10 -9 -10 -10 -10 -10 -10 -10 -3 -3 -9 -3 -10 -10 -10 -3 -3 -3 -PREHOOK: query: select 5 from dest1 -PREHOOK: type: QUERY -PREHOOK: Input: default@dest1 -#### A masked pattern was here #### -{"version":"1.0","engine":"mr","database":"default","hash":"bae960bf4376ec00e37258469b17360d","queryText":"select 5 from dest1","edges":[{"sources":[],"targets":[0],"expression":"5","edgeType":"PROJECTION"}],"vertices":[{"id":0,"vertexType":"COLUMN","vertexId":"_c0"}]} -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -PREHOOK: query: select 3 * 5 from dest1 -PREHOOK: type: QUERY -PREHOOK: Input: default@dest1 -#### A masked pattern was here #### -{"version":"1.0","engine":"mr","database":"default","hash":"753abad4d55afd3df34fdc73abfcd44d","queryText":"select 3 * 5 from dest1","edges":[{"sources":[],"targets":[0],"expression":"15","edgeType":"PROJECTION"}],"vertices":[{"id":0,"vertexType":"COLUMN","vertexId":"_c0"}]} -15 -15 -15 -15 -15 -15 -15 -15 -15 -15 -15 -15 -15 -15 -15 -15 -15 -15 -15 -15 -15 -15 -15 -15 -15 -15 -15 -15 -15 -15 -15 -15 -15 -15 -15 -15 -15 -15 -15 -15 -15 -15 -15 -15 -15 -15 -15 -15 -15 -15 -PREHOOK: query: drop table if exists dest2 -PREHOOK: type: DROPTABLE -PREHOOK: query: create table dest2 as select * from src1 JOIN src2 ON src1.key = src2.key2 -PREHOOK: type: CREATETABLE_AS_SELECT -PREHOOK: Input: default@src1 -PREHOOK: Input: default@src2 -PREHOOK: Output: database:default -PREHOOK: Output: default@dest2 -{"version":"1.0","engine":"mr","database":"default","hash":"386791c174a4999fc916e300b5e76bf2","queryText":"create table dest2 as select * from src1 JOIN src2 ON src1.key = src2.key2","edges":[{"sources":[4],"targets":[0],"edgeType":"PROJECTION"},{"sources":[5],"targets":[1],"edgeType":"PROJECTION"},{"sources":[6],"targets":[2],"edgeType":"PROJECTION"},{"sources":[7],"targets":[3],"edgeType":"PROJECTION"},{"sources":[4],"targets":[0,1,2,3],"expression":"src1.key is not null","edgeType":"PREDICATE"},{"sources":[4,6],"targets":[0,1,2,3],"expression":"(src1.key = src2.key2)","edgeType":"PREDICATE"},{"sources":[6],"targets":[0,1,2,3],"expression":"src2.key2 is not null","edgeType":"PREDICATE"}],"vertices":[{"id":0,"vertexType":"COLUMN","vertexId":"default.dest2.key"},{"id":1,"vertexType":"COLUMN","vertexId":"default.dest2.value"},{"id":2,"vertexType":"COLUMN","vertexId":"default.dest2.key2"},{"id":3,"vertexType":"COLUMN","vertexId":"default.dest2.value2"},{"id":4,"vertexType":"COLUMN","v ertexId":"default.src1.key"},{"id":5,"vertexType":"COLUMN","vertexId":"default.src1.value"},{"id":6,"vertexType":"COLUMN","vertexId":"default.src2.key2"},{"id":7,"vertexType":"COLUMN","vertexId":"default.src2.value2"}]} -PREHOOK: query: insert overwrite table dest2 select * from src1 JOIN src2 ON src1.key = src2.key2 -PREHOOK: type: QUERY -PREHOOK: Input: default@src1 -PREHOOK: Input: default@src2 -PREHOOK: Output: default@dest2 -{"version":"1.0","engine":"mr","database":"default","hash":"e494b771d94800dc3430bf5d0810cd9f","queryText":"insert overwrite table dest2 select * from src1 JOIN src2 ON src1.key = src2.key2","edges":[],"vertices":[]} -PREHOOK: query: insert into table dest2 select * from src1 JOIN src2 ON src1.key = src2.key2 -PREHOOK: type: QUERY -PREHOOK: Input: default@src1 -PREHOOK: Input: default@src2 -PREHOOK: Output: default@dest2 -{"version":"1.0","engine":"mr","database":"default","hash":"efeaddd0d36105b1013b414627850dc2","queryText":"insert into table dest2 select * from src1 JOIN src2 ON src1.key = src2.key2","edges":[],"vertices":[]} -PREHOOK: query: insert into table dest2 - select * from src1 JOIN src2 ON length(src1.value) = length(src2.value2) + 1 -PREHOOK: type: QUERY -PREHOOK: Input: default@src1 -PREHOOK: Input: default@src2 -PREHOOK: Output: default@dest2 -{"version":"1.0","engine":"mr","database":"default","hash":"e9450a56b3d103642e06bef0e4f0d482","queryText":"insert into table dest2\n select * from src1 JOIN src2 ON length(src1.value) = length(src2.value2) + 1","edges":[],"vertices":[]} -PREHOOK: query: select * from src1 where length(key) > 2 -PREHOOK: type: QUERY -PREHOOK: Input: default@src1 -#### A masked pattern was here #### -{"version":"1.0","engine":"mr","database":"default","hash":"4028c94d222d5dd221f651d414386972","queryText":"select * from src1 where length(key) > 2","edges":[{"sources":[2],"targets":[0],"edgeType":"PROJECTION"},{"sources":[3],"targets":[1],"edgeType":"PROJECTION"},{"sources":[2],"targets":[0,1],"expression":"(length(src1.key) > 2)","edgeType":"PREDICATE"}],"vertices":[{"id":0,"vertexType":"COLUMN","vertexId":"src1.key"},{"id":1,"vertexType":"COLUMN","vertexId":"src1.value"},{"id":2,"vertexType":"COLUMN","vertexId":"default.src1.key"},{"id":3,"vertexType":"COLUMN","vertexId":"default.src1.value"}]} -238 val_238 -311 val_311 -255 val_255 -278 val_278 -401 val_401 -150 val_150 -273 val_273 -224 -369 -128 -213 val_213 -146 val_146 -406 val_406 -PREHOOK: query: select * from src1 where length(key) > 2 and value > 'a' -PREHOOK: type: QUERY -PREHOOK: Input: default@src1 -#### A masked pattern was here #### -{"version":"1.0","engine":"mr","database":"default","hash":"5727531f7743cfcd60d634d8c835515f","queryText":"select * from src1 where length(key) > 2 and value > 'a'","edges":[{"sources":[2],"targets":[0],"edgeType":"PROJECTION"},{"sources":[3],"targets":[1],"edgeType":"PROJECTION"},{"sources":[2,3],"targets":[0,1],"expression":"((length(src1.key) > 2) and (src1.value > 'a'))","edgeType":"PREDICATE"}],"vertices":[{"id":0,"vertexType":"COLUMN","vertexId":"src1.key"},{"id":1,"vertexType":"COLUMN","vertexId":"src1.value"},{"id":2,"vertexType":"COLUMN","vertexId":"default.src1.key"},{"id":3,"vertexType":"COLUMN","vertexId":"default.src1.value"}]} -238 val_238 -311 val_311 -255 val_255 -278 val_278 -401 val_401 -150 val_150 -273 val_273 -213 val_213 -146 val_146 -406 val_406 -PREHOOK: query: drop table if exists dest3 -PREHOOK: type: DROPTABLE -PREHOOK: query: create table dest3 as - select * from src1 JOIN src2 ON src1.key = src2.key2 WHERE length(key) > 1 -PREHOOK: type: CREATETABLE_AS_SELECT -PREHOOK: Input: default@src1 -PREHOOK: Input: default@src2 -PREHOOK: Output: database:default -PREHOOK: Output: default@dest3 -{"version":"1.0","engine":"mr","database":"default","hash":"a2c4e9a3ec678039814f5d84b1e38ce4","queryText":"create table dest3 as\n select * from src1 JOIN src2 ON src1.key = src2.key2 WHERE length(key) > 1","edges":[{"sources":[4],"targets":[0],"edgeType":"PROJECTION"},{"sources":[5],"targets":[1],"edgeType":"PROJECTION"},{"sources":[6],"targets":[2],"edgeType":"PROJECTION"},{"sources":[7],"targets":[3],"edgeType":"PROJECTION"},{"sources":[4],"targets":[0,1,2,3],"expression":"((length(src1.key) > 1) and src1.key is not null)","edgeType":"PREDICATE"},{"sources":[4,6],"targets":[0,1,2,3],"expression":"(src1.key = src2.key2)","edgeType":"PREDICATE"},{"sources":[6],"targets":[0,1,2,3],"expression":"((length(src2.key2) > 1) and src2.key2 is not null)","edgeType":"PREDICATE"}],"vertices":[{"id":0,"vertexType":"COLUMN","vertexId":"default.dest3.key"},{"id":1,"vertexType":"COLUMN","vertexId":"default.dest3.value"},{"id":2,"vertexType":"COLUMN","vertexId":"default.dest3.key2"},{"id":3,"vert exType":"COLUMN","vertexId":"default.dest3.value2"},{"id":4,"vertexType":"COLUMN","vertexId":"default.src1.key"},{"id":5,"vertexType":"COLUMN","vertexId":"default.src1.value"},{"id":6,"vertexType":"COLUMN","vertexId":"default.src2.key2"},{"id":7,"vertexType":"COLUMN","vertexId":"default.src2.value2"}]} -PREHOOK: query: insert overwrite table dest2 - select * from src1 JOIN src2 ON src1.key = src2.key2 WHERE length(key) > 3 -PREHOOK: type: QUERY -PREHOOK: Input: default@src1 -PREHOOK: Input: default@src2 -PREHOOK: Output: default@dest2 -{"version":"1.0","engine":"mr","database":"default","hash":"76d84512204ddc576ad4d93f252e4358","queryText":"insert overwrite table dest2\n select * from src1 JOIN src2 ON src1.key = src2.key2 WHERE length(key) > 3","edges":[],"vertices":[]} -PREHOOK: query: drop table if exists dest_l1 -PREHOOK: type: DROPTABLE -PREHOOK: query: CREATE TABLE dest_l1(key INT, value STRING) STORED AS TEXTFILE -PREHOOK: type: CREATETABLE -PREHOOK: Output: database:default -PREHOOK: Output: default@dest_l1 -PREHOOK: query: INSERT OVERWRITE TABLE dest_l1 -SELECT j.* -FROM (SELECT t1.key, p1.value - FROM src1 t1 - LEFT OUTER JOIN src p1 - ON (t1.key = p1.key) - UNION ALL - SELECT t2.key, p2.value - FROM src1 t2 - LEFT OUTER JOIN src p2 - ON (t2.key = p2.key)) j -PREHOOK: type: QUERY -PREHOOK: Input: default@src -PREHOOK: Input: default@src1 -PREHOOK: Output: default@dest_l1 -{"version":"1.0","engine":"mr","database":"default","hash":"60b589744e2527dd235a6c8168d6a653","queryText":"INSERT OVERWRITE TABLE dest_l1\nSELECT j.*\nFROM (SELECT t1.key, p1.value\n FROM src1 t1\n LEFT OUTER JOIN src p1\n ON (t1.key = p1.key)\n UNION ALL\n SELECT t2.key, p2.value\n FROM src1 t2\n LEFT OUTER JOIN src p2\n ON (t2.key = p2.key)) j","edges":[{"sources":[2],"targets":[0],"expression":"UDFToInteger(key)","edgeType":"PROJECTION"},{"sources":[3],"targets":[1],"expression":"value","edgeType":"PROJECTION"},{"sources":[4,2],"targets":[0,1],"expression":"(j-subquery1:_u1-subquery1:p1.key = j-subquery1:_u1-subquery1:t1.key)","edgeType":"PREDICATE"},{"sources":[4,2],"targets":[0,1],"expression":"(j-subquery2:_u1-subquery2:p2.key = j-subquery2:_u1-subquery2:t2.key)","edgeType":"PREDICATE"}],"vertices":[{"id":0,"vertexType":"COLUMN","vertexId":"default.dest_l1.key"},{"id":1,"vertexType":"COLUMN","vertexId":"default.dest_l1.value"},{"id":2,"v ertexType":"COLUMN","vertexId":"default.src1.key"},{"id":3,"vertexType":"COLUMN","vertexId":"default.src.value"},{"id":4,"vertexType":"COLUMN","vertexId":"default.src.key"}]} -PREHOOK: query: drop table if exists emp -PREHOOK: type: DROPTABLE -PREHOOK: query: drop table if exists dept -PREHOOK: type: DROPTABLE -PREHOOK: query: drop table if exists project -PREHOOK: type: DROPTABLE -PREHOOK: query: drop table if exists tgt -PREHOOK: type: DROPTABLE -PREHOOK: query: create table emp(emp_id int, name string, mgr_id int, dept_id int) -PREHOOK: type: CREATETABLE -PREHOOK: Output: database:default -PREHOOK: Output: default@emp -PREHOOK: query: create table dept(dept_id int, dept_name string) -PREHOOK: type: CREATETABLE -PREHOOK: Output: database:default -PREHOOK: Output: default@dept -PREHOOK: query: create table project(project_id int, project_name string) -PREHOOK: type: CREATETABLE -PREHOOK: Output: database:default -PREHOOK: Output: default@project -PREHOOK: query: create table tgt(dept_name string, name string, - emp_id int, mgr_id int, proj_id int, proj_name string) -PREHOOK: type: CREATETABLE -PREHOOK: Output: database:default -PREHOOK: Output: default@tgt -PREHOOK: query: INSERT INTO TABLE tgt -SELECT emd.dept_name, emd.name, emd.emp_id, emd.mgr_id, p.project_id, p.project_name -FROM ( - SELECT d.dept_name, em.name, em.emp_id, em.mgr_id, em.dept_id - FROM ( - SELECT e.name, e.dept_id, e.emp_id emp_id, m.emp_id mgr_id - FROM emp e JOIN emp m ON e.emp_id = m.emp_id - ) em - JOIN dept d ON d.dept_id = em.dept_id - ) emd JOIN project p ON emd.dept_id = p.project_id -PREHOOK: type: QUERY -PREHOOK: Input: default@dept -PREHOOK: Input: default@emp -PREHOOK: Input: default@project -PREHOOK: Output: default@tgt -{"version":"1.0","engine":"mr","database":"default","hash":"f59797e0422d2e51515063374dfac361","queryText":"INSERT INTO TABLE tgt\nSELECT emd.dept_name, emd.name, emd.emp_id, emd.mgr_id, p.project_id, p.project_name\nFROM (\n SELECT d.dept_name, em.name, em.emp_id, em.mgr_id, em.dept_id\n FROM (\n SELECT e.name, e.dept_id, e.emp_id emp_id, m.emp_id mgr_id\n FROM emp e JOIN emp m ON e.emp_id = m.emp_id\n ) em\n JOIN dept d ON d.dept_id = em.dept_id\n ) emd JOIN project p ON emd.dept_id = p.project_id","edges":[{"sources":[6],"targets":[0],"edgeType":"PROJECTION"},{"sources":[7],"targets":[1],"edgeType":"PROJECTION"},{"sources":[8],"targets":[2,3],"edgeType":"PROJECTION"},{"sources":[9],"targets":[4],"edgeType":"PROJECTION"},{"sources":[10],"targets":[5],"edgeType":"PROJECTION"},{"sources":[8,11],"targets":[0,1,2,3,4,5],"expression":"(e.emp_id is not null and e.dept_id is not null)","edgeType":"PREDICATE"},{"sources":[8],"targets":[0,1,2,3,4,5],"expression":"(emd:em:e.emp_ id = emd:em:m.emp_id)","edgeType":"PREDICATE"},{"sources":[8],"targets":[0,1,2,3,4,5],"expression":"m.emp_id is not null","edgeType":"PREDICATE"},{"sources":[11,12,9],"targets":[0,1,2,3,4,5],"expression":"(emd:em:e.dept_id = emd:d.dept_id AND emd:em:e.dept_id = p.project_id)","edgeType":"PREDICATE"},{"sources":[12],"targets":[0,1,2,3,4,5],"expression":"d.dept_id is not null","edgeType":"PREDICATE"},{"sources":[9],"targets":[0,1,2,3,4,5],"expression":"p.project_id is not null","edgeType":"PREDICATE"}],"vertices":[{"id":0,"vertexType":"COLUMN","vertexId":"default.tgt.dept_name"},{"id":1,"vertexType":"COLUMN","vertexId":"default.tgt.name"},{"id":2,"vertexType":"COLUMN","vertexId":"default.tgt.emp_id"},{"id":3,"vertexType":"COLUMN","vertexId":"default.tgt.mgr_id"},{"id":4,"vertexType":"COLUMN","vertexId":"default.tgt.proj_id"},{"id":5,"vertexType":"COLUMN","vertexId":"default.tgt.proj_name"},{"id":6,"vertexType":"COLUMN","vertexId":"default.dept.dept_name"},{"id":7,"vertexType":"COLUMN" ,"vertexId":"default.emp.name"},{"id":8,"vertexType":"COLUMN","vertexId":"default.emp.emp_id"},{"id":9,"vertexType":"COLUMN","vertexId":"default.project.project_id"},{"id":10,"vertexType":"COLUMN","vertexId":"default.project.project_name"},{"id":11,"vertexType":"COLUMN","vertexId":"default.emp.dept_id"},{"id":12,"vertexType":"COLUMN","vertexId":"default.dept.dept_id"}]} -PREHOOK: query: drop table if exists dest_l2 -PREHOOK: type: DROPTABLE -PREHOOK: query: create table dest_l2 (id int, c1 tinyint, c2 int, c3 bigint) stored as textfile -PREHOOK: type: CREATETABLE -PREHOOK: Output: database:default -PREHOOK: Output: default@dest_l2 -PREHOOK: query: insert into dest_l2 values(0, 1, 100, 10000) -PREHOOK: type: QUERY -PREHOOK: Output: default@dest_l2 -{"version":"1.0","engine":"mr","database":"default","hash":"e001334e3f8384806b0f25a7c303045f","queryText":"insert into dest_l2 values(0, 1, 100, 10000)","edges":[{"sources":[],"targets":[0],"expression":"UDFToInteger(tmp_values_col1)","edgeType":"PROJECTION"},{"sources":[],"targets":[1],"expression":"UDFToByte(tmp_values_col2)","edgeType":"PROJECTION"},{"sources":[],"targets":[2],"expression":"UDFToInteger(tmp_values_col3)","edgeType":"PROJECTION"},{"sources":[],"targets":[3],"expression":"UDFToLong(tmp_values_col4)","edgeType":"PROJECTION"}],"vertices":[{"id":0,"vertexType":"COLUMN","vertexId":"default.dest_l2.id"},{"id":1,"vertexType":"COLUMN","vertexId":"default.dest_l2.c1"},{"id":2,"vertexType":"COLUMN","vertexId":"default.dest_l2.c2"},{"id":3,"vertexType":"COLUMN","vertexId":"default.dest_l2.c3"}]} -PREHOOK: query: select * from ( - select c1 + c2 x from dest_l2 - union all - select sum(c3) y from (select c3 from dest_l2) v1) v2 order by x -PREHOOK: type: QUERY -PREHOOK: Input: default@dest_l2 -#### A masked pattern was here #### -{"version":"1.0","engine":"mr","database":"default","hash":"a2c96a96be9d315ede966be5b45ef20e","queryText":"select * from (\n select c1 + c2 x from dest_l2\n union all\n select sum(c3) y from (select c3 from dest_l2) v1) v2 order by x","edges":[{"sources":[1,2,3],"targets":[0],"expression":"KEY.reducesinkkey0","edgeType":"PROJECTION"}],"vertices":[{"id":0,"vertexType":"COLUMN","vertexId":"v2.x"},{"id":1,"vertexType":"COLUMN","vertexId":"default.dest_l2.c1"},{"id":2,"vertexType":"COLUMN","vertexId":"default.dest_l2.c2"},{"id":3,"vertexType":"COLUMN","vertexId":"default.dest_l2.c3"}]} -101 -10000 -PREHOOK: query: drop table if exists dest_l3 -PREHOOK: type: DROPTABLE -PREHOOK: query: create table dest_l3 (id int, c1 string, c2 string, c3 int) stored as textfile -PREHOOK: type: CREATETABLE -PREHOOK: Output: database:default -PREHOOK: Output: default@dest_l3 -PREHOOK: query: insert into dest_l3 values(0, "s1", "s2", 15) -PREHOOK: type: QUERY -PREHOOK: Output: default@dest_l3 -{"version":"1.0","engine":"mr","database":"default","hash":"09df51ba6ba2d07f2304523ee505f094","queryText":"insert into dest_l3 values(0, \"s1\", \"s2\", 15)","edges":[{"sources":[],"targets":[0],"expression":"UDFToInteger(tmp_values_col1)","edgeType":"PROJECTION"},{"sources":[],"targets":[1,2],"edgeType":"PROJECTION"},{"sources":[],"targets":[3],"expression":"UDFToInteger(tmp_values_col4)","edgeType":"PROJECTION"}],"vertices":[{"id":0,"vertexType":"COLUMN","vertexId":"default.dest_l3.id"},{"id":1,"vertexType":"COLUMN","vertexId":"default.dest_l3.c1"},{"id":2,"vertexType":"COLUMN","vertexId":"default.dest_l3.c2"},{"id":3,"vertexType":"COLUMN","vertexId":"default.dest_l3.c3"}]} -PREHOOK: query: select sum(a.c1) over (partition by a.c1 order by a.id) -from dest_l2 a -where a.c2 != 10 -group by a.c1, a.c2, a.id -having count(a.c2) > 0 -PREHOOK: type: QUERY -PREHOOK: Input: default@dest_l2 -#### A masked pattern was here #### -{"version":"1.0","engine":"mr","database":"default","hash":"0ae7aa4a0cbd1283210fa79e8a19104a","queryText":"select sum(a.c1) over (partition by a.c1 order by a.id)\nfrom dest_l2 a\nwhere a.c2 != 10\ngroup by a.c1, a.c2, a.id\nhaving count(a.c2) > 0","edges":[{"sources":[1,2,3],"targets":[0],"expression":"$win$_col_0","edgeType":"PROJECTION"},{"sources":[2],"targets":[0],"expression":"(a.c2 <> 10)","edgeType":"PREDICATE"},{"sources":[2],"targets":[0],"expression":"(count(default.dest_l2.c2) > 0)","edgeType":"PREDICATE"}],"vertices":[{"id":0,"vertexType":"COLUMN","vertexId":"_c0"},{"id":1,"vertexType":"COLUMN","vertexId":"default.dest_l2.c1"},{"id":2,"vertexType":"COLUMN","vertexId":"default.dest_l2.c2"},{"id":3,"vertexType":"COLUMN","vertexId":"default.dest_l2.id"}]} -1 -PREHOOK: query: select sum(a.c1), count(b.c1), b.c2, b.c3 -from dest_l2 a join dest_l3 b on (a.id = b.id) -where a.c2 != 10 and b.c3 > 0 -group by a.c1, a.c2, a.id, b.c1, b.c2, b.c3 -having count(a.c2) > 0 -order by b.c3 limit 5 -PREHOOK: type: QUERY -PREHOOK: Input: default@dest_l2 -PREHOOK: Input: default@dest_l3 -#### A masked pattern was here #### -{"version":"1.0","engine":"mr","database":"default","hash":"01879c619517509d9f5b6ead998bb4bb","queryText":"select sum(a.c1), count(b.c1), b.c2, b.c3\nfrom dest_l2 a join dest_l3 b on (a.id = b.id)\nwhere a.c2 != 10 and b.c3 > 0\ngroup by a.c1, a.c2, a.id, b.c1, b.c2, b.c3\nhaving count(a.c2) > 0\norder by b.c3 limit 5","edges":[{"sources":[4],"targets":[0],"expression":"sum(default.dest_l2.c1)","edgeType":"PROJECTION"},{"sources":[5],"targets":[1],"expression":"count(default.dest_l3.c1)","edgeType":"PROJECTION"},{"sources":[6],"targets":[2],"edgeType":"PROJECTION"},{"sources":[7],"targets":[3],"edgeType":"PROJECTION"},{"sources":[8,9],"targets":[0,1,2,3],"expression":"((a.c2 <> 10) and a.id is not null)","edgeType":"PREDICATE"},{"sources":[9,10],"targets":[0,1,2,3],"expression":"(a.id = b.id)","edgeType":"PREDICATE"},{"sources":[7,10],"targets":[0,1,2,3],"expression":"((b.c3 > 0) and b.id is not null)","edgeType":"PREDICATE"},{"sources":[8],"targets":[0,1,2,3],"expression":"(count(d efault.dest_l2.c2) > 0)","edgeType":"PREDICATE"}],"vertices":[{"id":0,"vertexType":"COLUMN","vertexId":"_c0"},{"id":1,"vertexType":"COLUMN","vertexId":"_c1"},{"id":2,"vertexType":"COLUMN","vertexId":"b.c2"},{"id":3,"vertexType":"COLUMN","vertexId":"b.c3"},{"id":4,"vertexType":"COLUMN","vertexId":"default.dest_l2.c1"},{"id":5,"vertexType":"COLUMN","vertexId":"default.dest_l3.c1"},{"id":6,"vertexType":"COLUMN","vertexId":"default.dest_l3.c2"},{"id":7,"vertexType":"COLUMN","vertexId":"default.dest_l3.c3"},{"id":8,"vertexType":"COLUMN","vertexId":"default.dest_l2.c2"},{"id":9,"vertexType":"COLUMN","vertexId":"default.dest_l2.id"},{"id":10,"vertexType":"COLUMN","vertexId":"default.dest_l3.id"}]} -1 1 s2 15 -PREHOOK: query: drop table if exists t -PREHOOK: type: DROPTABLE -PREHOOK: query: create table t as -select distinct a.c2, a.c3 from dest_l2 a -inner join dest_l3 b on (a.id = b.id) -where a.id > 0 and b.c3 = 15 -PREHOOK: type: CREATETABLE_AS_SELECT -PREHOOK: Input: default@dest_l2 -PREHOOK: Input: default@dest_l3 -PREHOOK: Output: database:default -PREHOOK: Output: default@t -{"version":"1.0","engine":"mr","database":"default","hash":"0d2f15b494111ffe236d5be42a76fa28","queryText":"create table t as\nselect distinct a.c2, a.c3 from dest_l2 a\ninner join dest_l3 b on (a.id = b.id)\nwhere a.id > 0 and b.c3 = 15","edges":[{"sources":[2],"targets":[0],"edgeType":"PROJECTION"},{"sources":[3],"targets":[1],"edgeType":"PROJECTION"},{"sources":[4],"targets":[0,1],"expression":"(a.id > 0)","edgeType":"PREDICATE"},{"sources":[4,5],"targets":[0,1],"expression":"(a.id = b.id)","edgeType":"PREDICATE"},{"sources":[6,5],"targets":[0,1],"expression":"((b.c3 = 15) and (b.id > 0))","edgeType":"PREDICATE"}],"vertices":[{"id":0,"vertexType":"COLUMN","vertexId":"default.t.c2"},{"id":1,"vertexType":"COLUMN","vertexId":"default.t.c3"},{"id":2,"vertexType":"COLUMN","vertexId":"default.dest_l2.c2"},{"id":3,"vertexType":"COLUMN","vertexId":"default.dest_l2.c3"},{"id":4,"vertexType":"COLUMN","vertexId":"default.dest_l2.id"},{"id":5,"vertexType":"COLUMN","vertexId":"default.dest_l3. id"},{"id":6,"vertexType":"COLUMN","vertexId":"default.dest_l3.c3"}]} -PREHOOK: query: SELECT substr(src1.key,1,1), count(DISTINCT substr(src1.value,5)), -concat(substr(src1.key,1,1),sum(substr(src1.value,5))) -from src1 -GROUP BY substr(src1.key,1,1) -PREHOOK: type: QUERY -PREHOOK: Input: default@src1 -#### A masked pattern was here #### -{"version":"1.0","engine":"mr","database":"default","hash":"5b1022708124ee2b80f9e2e8a0dcb15c","queryText":"SELECT substr(src1.key,1,1), count(DISTINCT substr(src1.value,5)),\nconcat(substr(src1.key,1,1),sum(substr(src1.value,5)))\nfrom src1\nGROUP BY substr(src1.key,1,1)","edges":[{"sources":[3],"targets":[0],"expression":"substr(src1.key, 1, 1)","edgeType":"PROJECTION"},{"sources":[4],"targets":[1],"expression":"count(DISTINCT KEY._col1:0._col0)","edgeType":"PROJECTION"},{"sources":[3,5],"targets":[2],"expression":"concat(substr(src1.key, 1, 1), sum(substr(src1.value, 5)))","edgeType":"PROJECTION"}],"vertices":[{"id":0,"vertexType":"COLUMN","vertexId":"_c0"},{"id":1,"vertexType":"COLUMN","vertexId":"_c1"},{"id":2,"vertexType":"COLUMN","vertexId":"_c2"},{"id":3,"vertexType":"COLUMN","vertexId":"default.src1.key"},{"id":4,"vertexType":"TABLE","vertexId":"default.src1"},{"id":5,"vertexType":"COLUMN","vertexId":"default.src1.value"}]} - 7 1543.0 -1 3 1296.0 -2 6 21257.0 -3 2 3311.0 -4 2 4807.0 -6 1 666.0 -9 1 998.0 http://git-wip-us.apache.org/repos/asf/hive/blob/6f5c1135/ql/src/test/results/clientpositive/cbo_rp_semijoin.q.out ---------------------------------------------------------------------- diff --git a/ql/src/test/results/clientpositive/cbo_rp_semijoin.q.out b/ql/src/test/results/clientpositive/cbo_rp_semijoin.q.out deleted file mode 100644 index bdd8125..0000000 --- a/ql/src/test/results/clientpositive/cbo_rp_semijoin.q.out +++ /dev/null @@ -1,440 +0,0 @@ -PREHOOK: query: -- 12. SemiJoin -select cbo_t1.c_int from cbo_t1 left semi join cbo_t2 on cbo_t1.key=cbo_t2.key -PREHOOK: type: QUERY -PREHOOK: Input: default@cbo_t1 -PREHOOK: Input: default@cbo_t1@dt=2014 -PREHOOK: Input: default@cbo_t2 -PREHOOK: Input: default@cbo_t2@dt=2014 -#### A masked pattern was here #### -POSTHOOK: query: -- 12. SemiJoin -select cbo_t1.c_int from cbo_t1 left semi join cbo_t2 on cbo_t1.key=cbo_t2.key -POSTHOOK: type: QUERY -POSTHOOK: Input: default@cbo_t1 -POSTHOOK: Input: default@cbo_t1@dt=2014 -POSTHOOK: Input: default@cbo_t2 -POSTHOOK: Input: default@cbo_t2@dt=2014 -#### A masked pattern was here #### -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -PREHOOK: query: select cbo_t1.c_int from cbo_t1 left semi join cbo_t2 on cbo_t1.key=cbo_t2.key where (cbo_t1.c_int + 1 == 2) and (cbo_t1.c_int > 0 or cbo_t1.c_float >= 0) -PREHOOK: type: QUERY -PREHOOK: Input: default@cbo_t1 -PREHOOK: Input: default@cbo_t1@dt=2014 -PREHOOK: Input: default@cbo_t2 -PREHOOK: Input: default@cbo_t2@dt=2014 -#### A masked pattern was here #### -POSTHOOK: query: select cbo_t1.c_int from cbo_t1 left semi join cbo_t2 on cbo_t1.key=cbo_t2.key where (cbo_t1.c_int + 1 == 2) and (cbo_t1.c_int > 0 or cbo_t1.c_float >= 0) -POSTHOOK: type: QUERY -POSTHOOK: Input: default@cbo_t1 -POSTHOOK: Input: default@cbo_t1@dt=2014 -POSTHOOK: Input: default@cbo_t2 -POSTHOOK: Input: default@cbo_t2@dt=2014 -#### A masked pattern was here #### -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -PREHOOK: query: select * from (select c, b, a from (select key as a, c_int as b, cbo_t1.c_float as c from cbo_t1 where (cbo_t1.c_int + 1 == 2) and (cbo_t1.c_int > 0 or cbo_t1.c_float >= 0)) cbo_t1 left semi join (select cbo_t2.key as p, cbo_t2.c_int as q, c_float as r from cbo_t2 where (cbo_t2.c_int + 1 == 2) and (cbo_t2.c_int > 0 or cbo_t2.c_float >= 0)) cbo_t2 on cbo_t1.a=p left semi join cbo_t3 on cbo_t1.a=key where (b + 1 == 2) and (b > 0 or c >= 0)) R where (b + 1 = 2) and (R.b > 0 or c >= 0) -PREHOOK: type: QUERY -PREHOOK: Input: default@cbo_t1 -PREHOOK: Input: default@cbo_t1@dt=2014 -PREHOOK: Input: default@cbo_t2 -PREHOOK: Input: default@cbo_t2@dt=2014 -PREHOOK: Input: default@cbo_t3 -#### A masked pattern was here #### -POSTHOOK: query: select * from (select c, b, a from (select key as a, c_int as b, cbo_t1.c_float as c from cbo_t1 where (cbo_t1.c_int + 1 == 2) and (cbo_t1.c_int > 0 or cbo_t1.c_float >= 0)) cbo_t1 left semi join (select cbo_t2.key as p, cbo_t2.c_int as q, c_float as r from cbo_t2 where (cbo_t2.c_int + 1 == 2) and (cbo_t2.c_int > 0 or cbo_t2.c_float >= 0)) cbo_t2 on cbo_t1.a=p left semi join cbo_t3 on cbo_t1.a=key where (b + 1 == 2) and (b > 0 or c >= 0)) R where (b + 1 = 2) and (R.b > 0 or c >= 0) -POSTHOOK: type: QUERY -POSTHOOK: Input: default@cbo_t1 -POSTHOOK: Input: default@cbo_t1@dt=2014 -POSTHOOK: Input: default@cbo_t2 -POSTHOOK: Input: default@cbo_t2@dt=2014 -POSTHOOK: Input: default@cbo_t3 -#### A masked pattern was here #### -1.0 1 1 -1.0 1 1 -1.0 1 1 -1.0 1 1 -1.0 1 1 -1.0 1 1 -1.0 1 1 -1.0 1 1 -1.0 1 1 -1.0 1 1 -1.0 1 1 -1.0 1 1 -1.0 1 1 -1.0 1 1 -1.0 1 1 -1.0 1 1 -1.0 1 1 -1.0 1 1 -PREHOOK: query: select * from (select cbo_t3.c_int, cbo_t1.c, b from (select key as a, c_int as b, cbo_t1.c_float as c from cbo_t1 where (cbo_t1.c_int + 1 = 2) and (cbo_t1.c_int > 0 or cbo_t1.c_float >= 0)) cbo_t1 left semi join (select cbo_t2.key as p, cbo_t2.c_int as q, c_float as r from cbo_t2 where (cbo_t2.c_int + 1 == 2) and (cbo_t2.c_int > 0 or cbo_t2.c_float >= 0)) cbo_t2 on cbo_t1.a=p left outer join cbo_t3 on cbo_t1.a=key where (b + cbo_t3.c_int == 2) and (b > 0 or c_int >= 0)) R where (R.c_int + 1 = 2) and (R.b > 0 or c_int >= 0) -PREHOOK: type: QUERY -PREHOOK: Input: default@cbo_t1 -PREHOOK: Input: default@cbo_t1@dt=2014 -PREHOOK: Input: default@cbo_t2 -PREHOOK: Input: default@cbo_t2@dt=2014 -PREHOOK: Input: default@cbo_t3 -#### A masked pattern was here #### -POSTHOOK: query: select * from (select cbo_t3.c_int, cbo_t1.c, b from (select key as a, c_int as b, cbo_t1.c_float as c from cbo_t1 where (cbo_t1.c_int + 1 = 2) and (cbo_t1.c_int > 0 or cbo_t1.c_float >= 0)) cbo_t1 left semi join (select cbo_t2.key as p, cbo_t2.c_int as q, c_float as r from cbo_t2 where (cbo_t2.c_int + 1 == 2) and (cbo_t2.c_int > 0 or cbo_t2.c_float >= 0)) cbo_t2 on cbo_t1.a=p left outer join cbo_t3 on cbo_t1.a=key where (b + cbo_t3.c_int == 2) and (b > 0 or c_int >= 0)) R where (R.c_int + 1 = 2) and (R.b > 0 or c_int >= 0) -POSTHOOK: type: QUERY -POSTHOOK: Input: default@cbo_t1 -POSTHOOK: Input: default@cbo_t1@dt=2014 -POSTHOOK: Input: default@cbo_t2 -POSTHOOK: Input: default@cbo_t2@dt=2014 -POSTHOOK: Input: default@cbo_t3 -#### A masked pattern was here #### -1 1.0 1 -1 1.0 1 -1 1.0 1 -1 1.0 1 -1 1.0 1 -1 1.0 1 -1 1.0 1 -1 1.0 1 -1 1.0 1 -1 1.0 1 -1 1.0 1 -1 1.0 1 -1 1.0 1 -1 1.0 1 -1 1.0 1 -1 1.0 1 -1 1.0 1 -1 1.0 1 -1 1.0 1 -1 1.0 1 -1 1.0 1 -1 1.0 1 -1 1.0 1 -1 1.0 1 -1 1.0 1 -1 1.0 1 -1 1.0 1 -1 1.0 1 -1 1.0 1 -1 1.0 1 -1 1.0 1 -1 1.0 1 -1 1.0 1 -1 1.0 1 -1 1.0 1 -1 1.0 1 -1 1.0 1 -1 1.0 1 -1 1.0 1 -1 1.0 1 -1 1.0 1 -1 1.0 1 -1 1.0 1 -1 1.0 1 -1 1.0 1 -1 1.0 1 -1 1.0 1 -1 1.0 1 -1 1.0 1 -1 1.0 1 -1 1.0 1 -1 1.0 1 -1 1.0 1 -1 1.0 1 -1 1.0 1 -1 1.0 1 -1 1.0 1 -1 1.0 1 -1 1.0 1 -1 1.0 1 -1 1.0 1 -1 1.0 1 -1 1.0 1 -1 1.0 1 -1 1.0 1 -1 1.0 1 -1 1.0 1 -1 1.0 1 -1 1.0 1 -1 1.0 1 -1 1.0 1 -1 1.0 1 -1 1.0 1 -1 1.0 1 -1 1.0 1 -1 1.0 1 -1 1.0 1 -1 1.0 1 -1 1.0 1 -1 1.0 1 -1 1.0 1 -1 1.0 1 -1 1.0 1 -1 1.0 1 -PREHOOK: query: select * from (select c_int, b, cbo_t1.c from (select key as a, c_int as b, cbo_t1.c_float as c from cbo_t1 where (cbo_t1.c_int + 1 == 2) and (cbo_t1.c_int > 0 or cbo_t1.c_float >= 0)) cbo_t1 left semi join (select cbo_t2.key as p, cbo_t2.c_int as q, c_float as r from cbo_t2 where (cbo_t2.c_int + 1 == 2) and (cbo_t2.c_int > 0 or cbo_t2.c_float >= 0)) cbo_t2 on cbo_t1.a=p right outer join cbo_t3 on cbo_t1.a=key where (b + 1 == 2) and (b > 0 or c_int >= 0)) R where (c + 1 = 2) and (R.b > 0 or c_int >= 0) -PREHOOK: type: QUERY -PREHOOK: Input: default@cbo_t1 -PREHOOK: Input: default@cbo_t1@dt=2014 -PREHOOK: Input: default@cbo_t2 -PREHOOK: Input: default@cbo_t2@dt=2014 -PREHOOK: Input: default@cbo_t3 -#### A masked pattern was here #### -POSTHOOK: query: select * from (select c_int, b, cbo_t1.c from (select key as a, c_int as b, cbo_t1.c_float as c from cbo_t1 where (cbo_t1.c_int + 1 == 2) and (cbo_t1.c_int > 0 or cbo_t1.c_float >= 0)) cbo_t1 left semi join (select cbo_t2.key as p, cbo_t2.c_int as q, c_float as r from cbo_t2 where (cbo_t2.c_int + 1 == 2) and (cbo_t2.c_int > 0 or cbo_t2.c_float >= 0)) cbo_t2 on cbo_t1.a=p right outer join cbo_t3 on cbo_t1.a=key where (b + 1 == 2) and (b > 0 or c_int >= 0)) R where (c + 1 = 2) and (R.b > 0 or c_int >= 0) -POSTHOOK: type: QUERY -POSTHOOK: Input: default@cbo_t1 -POSTHOOK: Input: default@cbo_t1@dt=2014 -POSTHOOK: Input: default@cbo_t2 -POSTHOOK: Input: default@cbo_t2@dt=2014 -POSTHOOK: Input: default@cbo_t3 -#### A masked pattern was here #### -1 1 1.0 -1 1 1.0 -1 1 1.0 -1 1 1.0 -1 1 1.0 -1 1 1.0 -1 1 1.0 -1 1 1.0 -1 1 1.0 -1 1 1.0 -1 1 1.0 -1 1 1.0 -1 1 1.0 -1 1 1.0 -1 1 1.0 -1 1 1.0 -1 1 1.0 -1 1 1.0 -1 1 1.0 -1 1 1.0 -1 1 1.0 -1 1 1.0 -1 1 1.0 -1 1 1.0 -1 1 1.0 -1 1 1.0 -1 1 1.0 -1 1 1.0 -1 1 1.0 -1 1 1.0 -1 1 1.0 -1 1 1.0 -1 1 1.0 -1 1 1.0 -1 1 1.0 -1 1 1.0 -1 1 1.0 -1 1 1.0 -1 1 1.0 -1 1 1.0 -1 1 1.0 -1 1 1.0 -1 1 1.0 -1 1 1.0 -1 1 1.0 -1 1 1.0 -1 1 1.0 -1 1 1.0 -1 1 1.0 -1 1 1.0 -1 1 1.0 -1 1 1.0 -1 1 1.0 -1 1 1.0 -1 1 1.0 -1 1 1.0 -1 1 1.0 -1 1 1.0 -1 1 1.0 -1 1 1.0 -1 1 1.0 -1 1 1.0 -1 1 1.0 -1 1 1.0 -1 1 1.0 -1 1 1.0 -1 1 1.0 -1 1 1.0 -1 1 1.0 -1 1 1.0 -1 1 1.0 -1 1 1.0 -1 1 1.0 -1 1 1.0 -1 1 1.0 -1 1 1.0 -1 1 1.0 -1 1 1.0 -1 1 1.0 -1 1 1.0 -1 1 1.0 -1 1 1.0 -1 1 1.0 -1 1 1.0 -PREHOOK: query: select * from (select c_int, b, cbo_t1.c from (select key as a, c_int as b, cbo_t1.c_float as c from cbo_t1 where (cbo_t1.c_int + 1 == 2) and (cbo_t1.c_int > 0 or cbo_t1.c_float >= 0)) cbo_t1 left semi join (select cbo_t2.key as p, cbo_t2.c_int as q, c_float as r from cbo_t2 where (cbo_t2.c_int + 1 == 2) and (cbo_t2.c_int > 0 or cbo_t2.c_float >= 0)) cbo_t2 on cbo_t1.a=p full outer join cbo_t3 on cbo_t1.a=key where (b + 1 == 2) and (b > 0 or c_int >= 0)) R where (c + 1 = 2) and (R.b > 0 or c_int >= 0) -PREHOOK: type: QUERY -PREHOOK: Input: default@cbo_t1 -PREHOOK: Input: default@cbo_t1@dt=2014 -PREHOOK: Input: default@cbo_t2 -PREHOOK: Input: default@cbo_t2@dt=2014 -PREHOOK: Input: default@cbo_t3 -#### A masked pattern was here #### -POSTHOOK: query: select * from (select c_int, b, cbo_t1.c from (select key as a, c_int as b, cbo_t1.c_float as c from cbo_t1 where (cbo_t1.c_int + 1 == 2) and (cbo_t1.c_int > 0 or cbo_t1.c_float >= 0)) cbo_t1 left semi join (select cbo_t2.key as p, cbo_t2.c_int as q, c_float as r from cbo_t2 where (cbo_t2.c_int + 1 == 2) and (cbo_t2.c_int > 0 or cbo_t2.c_float >= 0)) cbo_t2 on cbo_t1.a=p full outer join cbo_t3 on cbo_t1.a=key where (b + 1 == 2) and (b > 0 or c_int >= 0)) R where (c + 1 = 2) and (R.b > 0 or c_int >= 0) -POSTHOOK: type: QUERY -POSTHOOK: Input: default@cbo_t1 -POSTHOOK: Input: default@cbo_t1@dt=2014 -POSTHOOK: Input: default@cbo_t2 -POSTHOOK: Input: default@cbo_t2@dt=2014 -POSTHOOK: Input: default@cbo_t3 -#### A masked pattern was here #### -1 1 1.0 -1 1 1.0 -1 1 1.0 -1 1 1.0 -1 1 1.0 -1 1 1.0 -1 1 1.0 -1 1 1.0 -1 1 1.0 -1 1 1.0 -1 1 1.0 -1 1 1.0 -1 1 1.0 -1 1 1.0 -1 1 1.0 -1 1 1.0 -1 1 1.0 -1 1 1.0 -1 1 1.0 -1 1 1.0 -1 1 1.0 -1 1 1.0 -1 1 1.0 -1 1 1.0 -1 1 1.0 -1 1 1.0 -1 1 1.0 -1 1 1.0 -1 1 1.0 -1 1 1.0 -1 1 1.0 -1 1 1.0 -1 1 1.0 -1 1 1.0 -1 1 1.0 -1 1 1.0 -1 1 1.0 -1 1 1.0 -1 1 1.0 -1 1 1.0 -1 1 1.0 -1 1 1.0 -1 1 1.0 -1 1 1.0 -1 1 1.0 -1 1 1.0 -1 1 1.0 -1 1 1.0 -1 1 1.0 -1 1 1.0 -1 1 1.0 -1 1 1.0 -1 1 1.0 -1 1 1.0 -1 1 1.0 -1 1 1.0 -1 1 1.0 -1 1 1.0 -1 1 1.0 -1 1 1.0 -1 1 1.0 -1 1 1.0 -1 1 1.0 -1 1 1.0 -1 1 1.0 -1 1 1.0 -1 1 1.0 -1 1 1.0 -1 1 1.0 -1 1 1.0 -1 1 1.0 -1 1 1.0 -1 1 1.0 -1 1 1.0 -1 1 1.0 -1 1 1.0 -1 1 1.0 -1 1 1.0 -1 1 1.0 -1 1 1.0 -1 1 1.0 -1 1 1.0 -1 1 1.0 -1 1 1.0 -PREHOOK: query: select a, c, count(*) from (select key as a, c_int+1 as b, sum(c_int) as c from cbo_t1 where (cbo_t1.c_int + 1 >= 0) and (cbo_t1.c_int > 0 or cbo_t1.c_float >= 0) group by c_float, cbo_t1.c_int, key having cbo_t1.c_float > 0 and (c_int >=1 or c_float >= 1) and (c_int + c_float) >= 0 order by a+b desc, c asc) cbo_t1 left semi join (select key as p, c_int+1 as q, sum(c_int) as r from cbo_t2 where (cbo_t2.c_int + 1 >= 0) and (cbo_t2.c_int > 0 or cbo_t2.c_float >= 0) group by c_float, cbo_t2.c_int, key having cbo_t2.c_float > 0 and (c_int >=1 or c_float >= 1) and (c_int + c_float) >= 0 order by q+r/10 desc, p) cbo_t2 on cbo_t1.a=p left semi join cbo_t3 on cbo_t1.a=key where (b + 1 >= 0) and (b > 0 or a >= 0) group by a, c having a > 0 and (a >=1 or c >= 1) and (a + c) >= 0 order by c, a -PREHOOK: type: QUERY -PREHOOK: Input: default@cbo_t1 -PREHOOK: Input: default@cbo_t1@dt=2014 -PREHOOK: Input: default@cbo_t2 -PREHOOK: Input: default@cbo_t2@dt=2014 -PREHOOK: Input: default@cbo_t3 -#### A masked pattern was here #### -POSTHOOK: query: select a, c, count(*) from (select key as a, c_int+1 as b, sum(c_int) as c from cbo_t1 where (cbo_t1.c_int + 1 >= 0) and (cbo_t1.c_int > 0 or cbo_t1.c_float >= 0) group by c_float, cbo_t1.c_int, key having cbo_t1.c_float > 0 and (c_int >=1 or c_float >= 1) and (c_int + c_float) >= 0 order by a+b desc, c asc) cbo_t1 left semi join (select key as p, c_int+1 as q, sum(c_int) as r from cbo_t2 where (cbo_t2.c_int + 1 >= 0) and (cbo_t2.c_int > 0 or cbo_t2.c_float >= 0) group by c_float, cbo_t2.c_int, key having cbo_t2.c_float > 0 and (c_int >=1 or c_float >= 1) and (c_int + c_float) >= 0 order by q+r/10 desc, p) cbo_t2 on cbo_t1.a=p left semi join cbo_t3 on cbo_t1.a=key where (b + 1 >= 0) and (b > 0 or a >= 0) group by a, c having a > 0 and (a >=1 or c >= 1) and (a + c) >= 0 order by c, a -POSTHOOK: type: QUERY -POSTHOOK: Input: default@cbo_t1 -POSTHOOK: Input: default@cbo_t1@dt=2014 -POSTHOOK: Input: default@cbo_t2 -POSTHOOK: Input: default@cbo_t2@dt=2014 -POSTHOOK: Input: default@cbo_t3 -#### A masked pattern was here #### - 1 2 1 - 1 2 1 -1 2 1 -1 12 1 -PREHOOK: query: select a, c, count(*) from (select key as a, c_int+1 as b, sum(c_int) as c from cbo_t1 where (cbo_t1.c_int + 1 >= 0) and (cbo_t1.c_int > 0 or cbo_t1.c_float >= 0) group by c_float, cbo_t1.c_int, key having cbo_t1.c_float > 0 and (c_int >=1 or c_float >= 1) and (c_int + c_float) >= 0 order by a+b desc, c asc limit 5) cbo_t1 left semi join (select key as p, c_int+1 as q, sum(c_int) as r from cbo_t2 where (cbo_t2.c_int + 1 >= 0) and (cbo_t2.c_int > 0 or cbo_t2.c_float >= 0) group by c_float, cbo_t2.c_int, key having cbo_t2.c_float > 0 and (c_int >=1 or c_float >= 1) and (c_int + c_float) >= 0 order by q+r/10 desc, p limit 5) cbo_t2 on cbo_t1.a=p left semi join cbo_t3 on cbo_t1.a=key where (b + 1 >= 0) and (b > 0 or a >= 0) group by a, c having a > 0 and (a >=1 or c >= 1) and (a + c) >= 0 order by c, a -PREHOOK: type: QUERY -PREHOOK: Input: default@cbo_t1 -PREHOOK: Input: default@cbo_t1@dt=2014 -PREHOOK: Input: default@cbo_t2 -PREHOOK: Input: default@cbo_t2@dt=2014 -PREHOOK: Input: default@cbo_t3 -#### A masked pattern was here #### -POSTHOOK: query: select a, c, count(*) from (select key as a, c_int+1 as b, sum(c_int) as c from cbo_t1 where (cbo_t1.c_int + 1 >= 0) and (cbo_t1.c_int > 0 or cbo_t1.c_float >= 0) group by c_float, cbo_t1.c_int, key having cbo_t1.c_float > 0 and (c_int >=1 or c_float >= 1) and (c_int + c_float) >= 0 order by a+b desc, c asc limit 5) cbo_t1 left semi join (select key as p, c_int+1 as q, sum(c_int) as r from cbo_t2 where (cbo_t2.c_int + 1 >= 0) and (cbo_t2.c_int > 0 or cbo_t2.c_float >= 0) group by c_float, cbo_t2.c_int, key having cbo_t2.c_float > 0 and (c_int >=1 or c_float >= 1) and (c_int + c_float) >= 0 order by q+r/10 desc, p limit 5) cbo_t2 on cbo_t1.a=p left semi join cbo_t3 on cbo_t1.a=key where (b + 1 >= 0) and (b > 0 or a >= 0) group by a, c having a > 0 and (a >=1 or c >= 1) and (a + c) >= 0 order by c, a -POSTHOOK: type: QUERY -POSTHOOK: Input: default@cbo_t1 -POSTHOOK: Input: default@cbo_t1@dt=2014 -POSTHOOK: Input: default@cbo_t2 -POSTHOOK: Input: default@cbo_t2@dt=2014 -POSTHOOK: Input: default@cbo_t3 -#### A masked pattern was here #### - 1 2 1 - 1 2 1 -1 2 1 -1 12 1 http://git-wip-us.apache.org/repos/asf/hive/blob/6f5c1135/ql/src/test/results/clientpositive/cbo_rp_subq_exists.q.out ---------------------------------------------------------------------- diff --git a/ql/src/test/results/clientpositive/cbo_rp_subq_exists.q.out b/ql/src/test/results/clientpositive/cbo_rp_subq_exists.q.out deleted file mode 100644 index 45f4524..0000000 --- a/ql/src/test/results/clientpositive/cbo_rp_subq_exists.q.out +++ /dev/null @@ -1,283 +0,0 @@ -PREHOOK: query: select * -from src_cbo b -where not exists - (select distinct a.key - from src_cbo a - where b.value = a.value and a.value > 'val_2' - ) -PREHOOK: type: QUERY -PREHOOK: Input: default@src_cbo -#### A masked pattern was here #### -POSTHOOK: query: select * -from src_cbo b -where not exists - (select distinct a.key - from src_cbo a - where b.value = a.value and a.value > 'val_2' - ) -POSTHOOK: type: QUERY -POSTHOOK: Input: default@src_cbo -#### A masked pattern was here #### -0 val_0 -0 val_0 -0 val_0 -10 val_10 -100 val_100 -100 val_100 -103 val_103 -103 val_103 -104 val_104 -104 val_104 -105 val_105 -11 val_11 -111 val_111 -113 val_113 -113 val_113 -114 val_114 -116 val_116 -118 val_118 -118 val_118 -119 val_119 -119 val_119 -119 val_119 -12 val_12 -12 val_12 -120 val_120 -120 val_120 -125 val_125 -125 val_125 -126 val_126 -128 val_128 -128 val_128 -128 val_128 -129 val_129 -129 val_129 -131 val_131 -133 val_133 -134 val_134 -134 val_134 -136 val_136 -137 val_137 -137 val_137 -138 val_138 -138 val_138 -138 val_138 -138 val_138 -143 val_143 -145 val_145 -146 val_146 -146 val_146 -149 val_149 -149 val_149 -15 val_15 -15 val_15 -150 val_150 -152 val_152 -152 val_152 -153 val_153 -155 val_155 -156 val_156 -157 val_157 -158 val_158 -160 val_160 -162 val_162 -163 val_163 -164 val_164 -164 val_164 -165 val_165 -165 val_165 -166 val_166 -167 val_167 -167 val_167 -167 val_167 -168 val_168 -169 val_169 -169 val_169 -169 val_169 -169 val_169 -17 val_17 -170 val_170 -172 val_172 -172 val_172 -174 val_174 -174 val_174 -175 val_175 -175 val_175 -176 val_176 -176 val_176 -177 val_177 -178 val_178 -179 val_179 -179 val_179 -18 val_18 -18 val_18 -180 val_180 -181 val_181 -183 val_183 -186 val_186 -187 val_187 -187 val_187 -187 val_187 -189 val_189 -19 val_19 -190 val_190 -191 val_191 -191 val_191 -192 val_192 -193 val_193 -193 val_193 -193 val_193 -194 val_194 -195 val_195 -195 val_195 -196 val_196 -197 val_197 -197 val_197 -199 val_199 -199 val_199 -199 val_199 -2 val_2 -PREHOOK: query: select * -from src_cbo b -group by key, value -having not exists - (select a.key - from src_cbo a - where b.value = a.value and a.key = b.key and a.value > 'val_12' - ) -PREHOOK: type: QUERY -PREHOOK: Input: default@src_cbo -#### A masked pattern was here #### -POSTHOOK: query: select * -from src_cbo b -group by key, value -having not exists - (select a.key - from src_cbo a - where b.value = a.value and a.key = b.key and a.value > 'val_12' - ) -POSTHOOK: type: QUERY -POSTHOOK: Input: default@src_cbo -#### A masked pattern was here #### -0 val_0 -10 val_10 -100 val_100 -103 val_103 -104 val_104 -105 val_105 -11 val_11 -111 val_111 -113 val_113 -114 val_114 -116 val_116 -118 val_118 -119 val_119 -12 val_12 -PREHOOK: query: create view cv1 as -select * -from src_cbo b -where exists - (select a.key - from src_cbo a - where b.value = a.value and a.key = b.key and a.value > 'val_9') -PREHOOK: type: CREATEVIEW -PREHOOK: Input: default@src_cbo -PREHOOK: Output: database:default -PREHOOK: Output: default@cv1 -POSTHOOK: query: create view cv1 as -select * -from src_cbo b -where exists - (select a.key - from src_cbo a - where b.value = a.value and a.key = b.key and a.value > 'val_9') -POSTHOOK: type: CREATEVIEW -POSTHOOK: Input: default@src_cbo -POSTHOOK: Output: database:default -POSTHOOK: Output: default@cv1 -PREHOOK: query: select * from cv1 -PREHOOK: type: QUERY -PREHOOK: Input: default@cv1 -PREHOOK: Input: default@src_cbo -#### A masked pattern was here #### -POSTHOOK: query: select * from cv1 -POSTHOOK: type: QUERY -POSTHOOK: Input: default@cv1 -POSTHOOK: Input: default@src_cbo -#### A masked pattern was here #### -90 val_90 -90 val_90 -90 val_90 -92 val_92 -95 val_95 -95 val_95 -96 val_96 -97 val_97 -97 val_97 -98 val_98 -98 val_98 -PREHOOK: query: select * -from (select * - from src_cbo b - where exists - (select a.key - from src_cbo a - where b.value = a.value and a.key = b.key and a.value > 'val_9') - ) a -PREHOOK: type: QUERY -PREHOOK: Input: default@src_cbo -#### A masked pattern was here #### -POSTHOOK: query: select * -from (select * - from src_cbo b - where exists - (select a.key - from src_cbo a - where b.value = a.value and a.key = b.key and a.value > 'val_9') - ) a -POSTHOOK: type: QUERY -POSTHOOK: Input: default@src_cbo -#### A masked pattern was here #### -90 val_90 -90 val_90 -90 val_90 -92 val_92 -95 val_95 -95 val_95 -96 val_96 -97 val_97 -97 val_97 -98 val_98 -98 val_98 -PREHOOK: query: select * -from (select b.key, count(*) - from src_cbo b - group by b.key - having exists - (select a.key - from src_cbo a - where a.key = b.key and a.value > 'val_9' - ) -) a -PREHOOK: type: QUERY -PREHOOK: Input: default@src_cbo -#### A masked pattern was here #### -POSTHOOK: query: select * -from (select b.key, count(*) - from src_cbo b - group by b.key - having exists - (select a.key - from src_cbo a - where a.key = b.key and a.value > 'val_9' - ) -) a -POSTHOOK: type: QUERY -POSTHOOK: Input: default@src_cbo -#### A masked pattern was here #### -90 3 -92 1 -95 2 -96 1 -97 2 -98 2 http://git-wip-us.apache.org/repos/asf/hive/blob/6f5c1135/ql/src/test/results/clientpositive/cbo_rp_subq_in.q.out ---------------------------------------------------------------------- diff --git a/ql/src/test/results/clientpositive/cbo_rp_subq_in.q.out b/ql/src/test/results/clientpositive/cbo_rp_subq_in.q.out deleted file mode 100644 index f6bfad2..0000000 --- a/ql/src/test/results/clientpositive/cbo_rp_subq_in.q.out +++ /dev/null @@ -1,151 +0,0 @@ -PREHOOK: query: -- 17. SubQueries In --- non agg, non corr -select * -from src_cbo -where src_cbo.key in (select key from src_cbo s1 where s1.key > '9') order by key -PREHOOK: type: QUERY -PREHOOK: Input: default@src_cbo -#### A masked pattern was here #### -POSTHOOK: query: -- 17. SubQueries In --- non agg, non corr -select * -from src_cbo -where src_cbo.key in (select key from src_cbo s1 where s1.key > '9') order by key -POSTHOOK: type: QUERY -POSTHOOK: Input: default@src_cbo -#### A masked pattern was here #### -90 val_90 -90 val_90 -90 val_90 -92 val_92 -95 val_95 -95 val_95 -96 val_96 -97 val_97 -97 val_97 -98 val_98 -98 val_98 -PREHOOK: query: -- agg, corr --- add back once rank issue fixed for cbo - --- distinct, corr -select * -from src_cbo b -where b.key in - (select distinct a.key - from src_cbo a - where b.value = a.value and a.key > '9' - ) order by b.key -PREHOOK: type: QUERY -PREHOOK: Input: default@src_cbo -#### A masked pattern was here #### -POSTHOOK: query: -- agg, corr --- add back once rank issue fixed for cbo - --- distinct, corr -select * -from src_cbo b -where b.key in - (select distinct a.key - from src_cbo a - where b.value = a.value and a.key > '9' - ) order by b.key -POSTHOOK: type: QUERY -POSTHOOK: Input: default@src_cbo -#### A masked pattern was here #### -90 val_90 -90 val_90 -90 val_90 -92 val_92 -95 val_95 -95 val_95 -96 val_96 -97 val_97 -97 val_97 -98 val_98 -98 val_98 -PREHOOK: query: -- non agg, corr, with join in Parent Query -select p.p_partkey, li.l_suppkey -from (select distinct l_partkey as p_partkey from lineitem) p join lineitem li on p.p_partkey = li.l_partkey -where li.l_linenumber = 1 and - li.l_orderkey in (select l_orderkey from lineitem where l_shipmode = 'AIR' and l_linenumber = li.l_linenumber) - order by p.p_partkey -PREHOOK: type: QUERY -PREHOOK: Input: default@lineitem -#### A masked pattern was here #### -POSTHOOK: query: -- non agg, corr, with join in Parent Query -select p.p_partkey, li.l_suppkey -from (select distinct l_partkey as p_partkey from lineitem) p join lineitem li on p.p_partkey = li.l_partkey -where li.l_linenumber = 1 and - li.l_orderkey in (select l_orderkey from lineitem where l_shipmode = 'AIR' and l_linenumber = li.l_linenumber) - order by p.p_partkey -POSTHOOK: type: QUERY -POSTHOOK: Input: default@lineitem -#### A masked pattern was here #### -4297 1798 -108570 8571 -PREHOOK: query: -- where and having --- Plan is: --- Stage 1: b semijoin sq1:src_cbo (subquery in where) --- Stage 2: group by Stage 1 o/p --- Stage 5: group by on sq2:src_cbo (subquery in having) --- Stage 6: Stage 2 o/p semijoin Stage 5 -select key, value, count(*) -from src_cbo b -where b.key in (select key from src_cbo where src_cbo.key > '8') -group by key, value -having count(*) in (select count(*) from src_cbo s1 where s1.key > '9' group by s1.key ) order by key -PREHOOK: type: QUERY -PREHOOK: Input: default@src_cbo -#### A masked pattern was here #### -POSTHOOK: query: -- where and having --- Plan is: --- Stage 1: b semijoin sq1:src_cbo (subquery in where) --- Stage 2: group by Stage 1 o/p --- Stage 5: group by on sq2:src_cbo (subquery in having) --- Stage 6: Stage 2 o/p semijoin Stage 5 -select key, value, count(*) -from src_cbo b -where b.key in (select key from src_cbo where src_cbo.key > '8') -group by key, value -having count(*) in (select count(*) from src_cbo s1 where s1.key > '9' group by s1.key ) order by key -POSTHOOK: type: QUERY -POSTHOOK: Input: default@src_cbo -#### A masked pattern was here #### -80 val_80 1 -82 val_82 1 -83 val_83 2 -84 val_84 2 -85 val_85 1 -86 val_86 1 -87 val_87 1 -9 val_9 1 -90 val_90 3 -92 val_92 1 -95 val_95 2 -96 val_96 1 -97 val_97 2 -98 val_98 2 -PREHOOK: query: -- non agg, non corr, windowing -select p_mfgr, p_name, avg(p_size) -from part -group by p_mfgr, p_name -having p_name in - (select first_value(p_name) over(partition by p_mfgr order by p_size) from part) order by p_mfgr -PREHOOK: type: QUERY -PREHOOK: Input: default@part -#### A masked pattern was here #### -POSTHOOK: query: -- non agg, non corr, windowing -select p_mfgr, p_name, avg(p_size) -from part -group by p_mfgr, p_name -having p_name in - (select first_value(p_name) over(partition by p_mfgr order by p_size) from part) order by p_mfgr -POSTHOOK: type: QUERY -POSTHOOK: Input: default@part -#### A masked pattern was here #### -Manufacturer#1 almond antique burnished rose metallic 2.0 -Manufacturer#2 almond aquamarine midnight light salmon 2.0 -Manufacturer#3 almond antique misty red olive 1.0 -Manufacturer#4 almond aquamarine yellow dodger mint 7.0 -Manufacturer#5 almond antique sky peru orange 2.0 http://git-wip-us.apache.org/repos/asf/hive/blob/6f5c1135/ql/src/test/results/clientpositive/cbo_rp_subq_not_in.q.out ---------------------------------------------------------------------- diff --git a/ql/src/test/results/clientpositive/cbo_rp_subq_not_in.q.out b/ql/src/test/results/clientpositive/cbo_rp_subq_not_in.q.out deleted file mode 100644 index c7274f7..0000000 --- a/ql/src/test/results/clientpositive/cbo_rp_subq_not_in.q.out +++ /dev/null @@ -1,365 +0,0 @@ -PREHOOK: query: -- 16. SubQueries Not In --- non agg, non corr -select * -from src_cbo -where src_cbo.key not in - ( select key from src_cbo s1 - where s1.key > '2' - ) order by key -PREHOOK: type: QUERY -PREHOOK: Input: default@src_cbo -#### A masked pattern was here #### -POSTHOOK: query: -- 16. SubQueries Not In --- non agg, non corr -select * -from src_cbo -where src_cbo.key not in - ( select key from src_cbo s1 - where s1.key > '2' - ) order by key -POSTHOOK: type: QUERY -POSTHOOK: Input: default@src_cbo -#### A masked pattern was here #### -0 val_0 -0 val_0 -0 val_0 -10 val_10 -100 val_100 -100 val_100 -103 val_103 -103 val_103 -104 val_104 -104 val_104 -105 val_105 -11 val_11 -111 val_111 -113 val_113 -113 val_113 -114 val_114 -116 val_116 -118 val_118 -118 val_118 -119 val_119 -119 val_119 -119 val_119 -12 val_12 -12 val_12 -120 val_120 -120 val_120 -125 val_125 -125 val_125 -126 val_126 -128 val_128 -128 val_128 -128 val_128 -129 val_129 -129 val_129 -131 val_131 -133 val_133 -134 val_134 -134 val_134 -136 val_136 -137 val_137 -137 val_137 -138 val_138 -138 val_138 -138 val_138 -138 val_138 -143 val_143 -145 val_145 -146 val_146 -146 val_146 -149 val_149 -149 val_149 -15 val_15 -15 val_15 -150 val_150 -152 val_152 -152 val_152 -153 val_153 -155 val_155 -156 val_156 -157 val_157 -158 val_158 -160 val_160 -162 val_162 -163 val_163 -164 val_164 -164 val_164 -165 val_165 -165 val_165 -166 val_166 -167 val_167 -167 val_167 -167 val_167 -168 val_168 -169 val_169 -169 val_169 -169 val_169 -169 val_169 -17 val_17 -170 val_170 -172 val_172 -172 val_172 -174 val_174 -174 val_174 -175 val_175 -175 val_175 -176 val_176 -176 val_176 -177 val_177 -178 val_178 -179 val_179 -179 val_179 -18 val_18 -18 val_18 -180 val_180 -181 val_181 -183 val_183 -186 val_186 -187 val_187 -187 val_187 -187 val_187 -189 val_189 -19 val_19 -190 val_190 -191 val_191 -191 val_191 -192 val_192 -193 val_193 -193 val_193 -193 val_193 -194 val_194 -195 val_195 -195 val_195 -196 val_196 -197 val_197 -197 val_197 -199 val_199 -199 val_199 -199 val_199 -2 val_2 -PREHOOK: query: -- non agg, corr -select p_mfgr, b.p_name, p_size -from part b -where b.p_name not in - (select p_name - from (select p_mfgr, p_name, p_size as r from part) a - where r < 10 and b.p_mfgr = a.p_mfgr - ) order by p_mfgr,p_size -PREHOOK: type: QUERY -PREHOOK: Input: default@part -#### A masked pattern was here #### -POSTHOOK: query: -- non agg, corr -select p_mfgr, b.p_name, p_size -from part b -where b.p_name not in - (select p_name - from (select p_mfgr, p_name, p_size as r from part) a - where r < 10 and b.p_mfgr = a.p_mfgr - ) order by p_mfgr,p_size -POSTHOOK: type: QUERY -POSTHOOK: Input: default@part -#### A masked pattern was here #### -Manufacturer#1 almond aquamarine burnished black steel 28 -Manufacturer#1 almond antique chartreuse lavender yellow 34 -Manufacturer#1 almond aquamarine pink moccasin thistle 42 -Manufacturer#2 almond antique violet chocolate turquoise 14 -Manufacturer#2 almond aquamarine sandy cyan gainsboro 18 -Manufacturer#2 almond aquamarine rose maroon antique 25 -Manufacturer#2 almond antique violet turquoise frosted 40 -Manufacturer#3 almond antique forest lavender goldenrod 14 -Manufacturer#3 almond antique chartreuse khaki white 17 -Manufacturer#3 almond antique metallic orange dim 19 -Manufacturer#3 almond antique olive coral navajo 45 -Manufacturer#4 almond antique gainsboro frosted violet 10 -Manufacturer#4 almond azure aquamarine papaya violet 12 -Manufacturer#4 almond aquamarine floral ivory bisque 27 -Manufacturer#4 almond antique violet mint lemon 39 -Manufacturer#5 almond azure blanched chiffon midnight 23 -Manufacturer#5 almond antique blue firebrick mint 31 -Manufacturer#5 almond aquamarine dodger light gainsboro 46 -PREHOOK: query: -- agg, non corr -select p_name, p_size -from -part where part.p_size not in - (select avg(p_size) - from (select p_size from part) a - where p_size < 10 - ) order by p_name -PREHOOK: type: QUERY -PREHOOK: Input: default@part -#### A masked pattern was here #### -POSTHOOK: query: -- agg, non corr -select p_name, p_size -from -part where part.p_size not in - (select avg(p_size) - from (select p_size from part) a - where p_size < 10 - ) order by p_name -POSTHOOK: type: QUERY -POSTHOOK: Input: default@part -#### A masked pattern was here #### -almond antique blue firebrick mint 31 -almond antique burnished rose metallic 2 -almond antique burnished rose metallic 2 -almond antique chartreuse khaki white 17 -almond antique chartreuse lavender yellow 34 -almond antique forest lavender goldenrod 14 -almond antique gainsboro frosted violet 10 -almond antique medium spring khaki 6 -almond antique metallic orange dim 19 -almond antique misty red olive 1 -almond antique olive coral navajo 45 -almond antique salmon chartreuse burlywood 6 -almond antique sky peru orange 2 -almond antique violet chocolate turquoise 14 -almond antique violet mint lemon 39 -almond antique violet turquoise frosted 40 -almond aquamarine burnished black steel 28 -almond aquamarine dodger light gainsboro 46 -almond aquamarine floral ivory bisque 27 -almond aquamarine midnight light salmon 2 -almond aquamarine pink moccasin thistle 42 -almond aquamarine rose maroon antique 25 -almond aquamarine sandy cyan gainsboro 18 -almond aquamarine yellow dodger mint 7 -almond azure aquamarine papaya violet 12 -almond azure blanched chiffon midnight 23 -PREHOOK: query: -- agg, corr -select p_mfgr, p_name, p_size -from part b where b.p_size not in - (select min(p_size) - from (select p_mfgr, p_size from part) a - where p_size < 10 and b.p_mfgr = a.p_mfgr - ) order by p_name -PREHOOK: type: QUERY -PREHOOK: Input: default@part -#### A masked pattern was here #### -POSTHOOK: query: -- agg, corr -select p_mfgr, p_name, p_size -from part b where b.p_size not in - (select min(p_size) - from (select p_mfgr, p_size from part) a - where p_size < 10 and b.p_mfgr = a.p_mfgr - ) order by p_name -POSTHOOK: type: QUERY -POSTHOOK: Input: default@part -#### A masked pattern was here #### -Manufacturer#5 almond antique blue firebrick mint 31 -Manufacturer#3 almond antique chartreuse khaki white 17 -Manufacturer#1 almond antique chartreuse lavender yellow 34 -Manufacturer#3 almond antique forest lavender goldenrod 14 -Manufacturer#4 almond antique gainsboro frosted violet 10 -Manufacturer#5 almond antique medium spring khaki 6 -Manufacturer#3 almond antique metallic orange dim 19 -Manufacturer#3 almond antique olive coral navajo 45 -Manufacturer#1 almond antique salmon chartreuse burlywood 6 -Manufacturer#2 almond antique violet chocolate turquoise 14 -Manufacturer#4 almond antique violet mint lemon 39 -Manufacturer#2 almond antique violet turquoise frosted 40 -Manufacturer#1 almond aquamarine burnished black steel 28 -Manufacturer#5 almond aquamarine dodger light gainsboro 46 -Manufacturer#4 almond aquamarine floral ivory bisque 27 -Manufacturer#1 almond aquamarine pink moccasin thistle 42 -Manufacturer#2 almond aquamarine rose maroon antique 25 -Manufacturer#2 almond aquamarine sandy cyan gainsboro 18 -Manufacturer#4 almond azure aquamarine papaya violet 12 -Manufacturer#5 almond azure blanched chiffon midnight 23 -PREHOOK: query: -- non agg, non corr, Group By in Parent Query -select li.l_partkey, count(*) -from lineitem li -where li.l_linenumber = 1 and - li.l_orderkey not in (select l_orderkey from lineitem where l_shipmode = 'AIR') -group by li.l_partkey order by li.l_partkey -PREHOOK: type: QUERY -PREHOOK: Input: default@lineitem -#### A masked pattern was here #### -POSTHOOK: query: -- non agg, non corr, Group By in Parent Query -select li.l_partkey, count(*) -from lineitem li -where li.l_linenumber = 1 and - li.l_orderkey not in (select l_orderkey from lineitem where l_shipmode = 'AIR') -group by li.l_partkey order by li.l_partkey -POSTHOOK: type: QUERY -POSTHOOK: Input: default@lineitem -#### A masked pattern was here #### -450 1 -7068 1 -21636 1 -22630 1 -59694 1 -61931 1 -85951 1 -88035 1 -88362 1 -106170 1 -119477 1 -119767 1 -123076 1 -139636 1 -175839 1 -182052 1 -PREHOOK: query: -- add null check test from sq_notin.q once HIVE-7721 resolved. - --- non agg, corr, having -select b.p_mfgr, min(p_retailprice) -from part b -group by b.p_mfgr -having b.p_mfgr not in - (select p_mfgr - from (select p_mfgr, min(p_retailprice) l, max(p_retailprice) r, avg(p_retailprice) a from part group by p_mfgr) a - where min(p_retailprice) = l and r - l > 600 - ) - order by b.p_mfgr -PREHOOK: type: QUERY -PREHOOK: Input: default@part -#### A masked pattern was here #### -POSTHOOK: query: -- add null check test from sq_notin.q once HIVE-7721 resolved. - --- non agg, corr, having -select b.p_mfgr, min(p_retailprice) -from part b -group by b.p_mfgr -having b.p_mfgr not in - (select p_mfgr - from (select p_mfgr, min(p_retailprice) l, max(p_retailprice) r, avg(p_retailprice) a from part group by p_mfgr) a - where min(p_retailprice) = l and r - l > 600 - ) - order by b.p_mfgr -POSTHOOK: type: QUERY -POSTHOOK: Input: default@part -#### A masked pattern was here #### -Manufacturer#1 1173.15 -Manufacturer#2 1690.68 -PREHOOK: query: -- agg, non corr, having -select b.p_mfgr, min(p_retailprice) -from part b -group by b.p_mfgr -having b.p_mfgr not in - (select p_mfgr - from part a - group by p_mfgr - having max(p_retailprice) - min(p_retailprice) > 600 - ) - order by b.p_mfgr -PREHOOK: type: QUERY -PREHOOK: Input: default@part -#### A masked pattern was here #### -POSTHOOK: query: -- agg, non corr, having -select b.p_mfgr, min(p_retailprice) -from part b -group by b.p_mfgr -having b.p_mfgr not in - (select p_mfgr - from part a - group by p_mfgr - having max(p_retailprice) - min(p_retailprice) > 600 - ) - order by b.p_mfgr -POSTHOOK: type: QUERY -POSTHOOK: Input: default@part -#### A masked pattern was here #### -Manufacturer#1 1173.15 -Manufacturer#2 1690.68 http://git-wip-us.apache.org/repos/asf/hive/blob/6f5c1135/ql/src/test/results/clientpositive/cbo_rp_udf_udaf.q.out ---------------------------------------------------------------------- diff --git a/ql/src/test/results/clientpositive/cbo_rp_udf_udaf.q.out b/ql/src/test/results/clientpositive/cbo_rp_udf_udaf.q.out deleted file mode 100644 index b30d9da..0000000 --- a/ql/src/test/results/clientpositive/cbo_rp_udf_udaf.q.out +++ /dev/null @@ -1,123 +0,0 @@ -PREHOOK: query: -- SORT_QUERY_RESULTS - --- 8. Test UDF/UDAF -select count(*), count(c_int), sum(c_int), avg(c_int), max(c_int), min(c_int) from cbo_t1 -PREHOOK: type: QUERY -PREHOOK: Input: default@cbo_t1 -PREHOOK: Input: default@cbo_t1@dt=2014 -#### A masked pattern was here #### -POSTHOOK: query: -- SORT_QUERY_RESULTS - --- 8. Test UDF/UDAF -select count(*), count(c_int), sum(c_int), avg(c_int), max(c_int), min(c_int) from cbo_t1 -POSTHOOK: type: QUERY -POSTHOOK: Input: default@cbo_t1 -POSTHOOK: Input: default@cbo_t1@dt=2014 -#### A masked pattern was here #### -20 18 18 1.0 1 1 -PREHOOK: query: select count(*), count(c_int) as a, sum(c_int), avg(c_int), max(c_int), min(c_int), case c_int when 0 then 1 when 1 then 2 else 3 end, sum(case c_int when 0 then 1 when 1 then 2 else 3 end) from cbo_t1 group by c_int order by a -PREHOOK: type: QUERY -PREHOOK: Input: default@cbo_t1 -PREHOOK: Input: default@cbo_t1@dt=2014 -#### A masked pattern was here #### -POSTHOOK: query: select count(*), count(c_int) as a, sum(c_int), avg(c_int), max(c_int), min(c_int), case c_int when 0 then 1 when 1 then 2 else 3 end, sum(case c_int when 0 then 1 when 1 then 2 else 3 end) from cbo_t1 group by c_int order by a -POSTHOOK: type: QUERY -POSTHOOK: Input: default@cbo_t1 -POSTHOOK: Input: default@cbo_t1@dt=2014 -#### A masked pattern was here #### -18 18 18 1.0 1 1 2 36 -2 0 NULL NULL NULL NULL 3 6 -PREHOOK: query: select * from (select count(*) as a, count(distinct c_int) as b, sum(c_int) as c, avg(c_int) as d, max(c_int) as e, min(c_int) as f from cbo_t1) cbo_t1 -PREHOOK: type: QUERY -PREHOOK: Input: default@cbo_t1 -PREHOOK: Input: default@cbo_t1@dt=2014 -#### A masked pattern was here #### -POSTHOOK: query: select * from (select count(*) as a, count(distinct c_int) as b, sum(c_int) as c, avg(c_int) as d, max(c_int) as e, min(c_int) as f from cbo_t1) cbo_t1 -POSTHOOK: type: QUERY -POSTHOOK: Input: default@cbo_t1 -POSTHOOK: Input: default@cbo_t1@dt=2014 -#### A masked pattern was here #### -20 1 18 1.0 1 1 -PREHOOK: query: select * from (select count(*) as a, count(distinct c_int) as b, sum(c_int) as c, avg(c_int) as d, max(c_int) as e, min(c_int) as f, case c_int when 0 then 1 when 1 then 2 else 3 end as g, sum(case c_int when 0 then 1 when 1 then 2 else 3 end) as h from cbo_t1 group by c_int) cbo_t1 order by a -PREHOOK: type: QUERY -PREHOOK: Input: default@cbo_t1 -PREHOOK: Input: default@cbo_t1@dt=2014 -#### A masked pattern was here #### -POSTHOOK: query: select * from (select count(*) as a, count(distinct c_int) as b, sum(c_int) as c, avg(c_int) as d, max(c_int) as e, min(c_int) as f, case c_int when 0 then 1 when 1 then 2 else 3 end as g, sum(case c_int when 0 then 1 when 1 then 2 else 3 end) as h from cbo_t1 group by c_int) cbo_t1 order by a -POSTHOOK: type: QUERY -POSTHOOK: Input: default@cbo_t1 -POSTHOOK: Input: default@cbo_t1@dt=2014 -#### A masked pattern was here #### -18 1 18 1.0 1 1 2 36 -2 0 NULL NULL NULL NULL 3 6 -PREHOOK: query: select f,a,e,b from (select count(*) as a, count(c_int) as b, sum(c_int) as c, avg(c_int) as d, max(c_int) as e, min(c_int) as f from cbo_t1) cbo_t1 -PREHOOK: type: QUERY -PREHOOK: Input: default@cbo_t1 -#### A masked pattern was here #### -POSTHOOK: query: select f,a,e,b from (select count(*) as a, count(c_int) as b, sum(c_int) as c, avg(c_int) as d, max(c_int) as e, min(c_int) as f from cbo_t1) cbo_t1 -POSTHOOK: type: QUERY -POSTHOOK: Input: default@cbo_t1 -#### A masked pattern was here #### -1 20 1 18 -PREHOOK: query: select f,a,e,b from (select count(*) as a, count(distinct c_int) as b, sum(distinct c_int) as c, avg(distinct c_int) as d, max(distinct c_int) as e, min(distinct c_int) as f from cbo_t1) cbo_t1 -PREHOOK: type: QUERY -PREHOOK: Input: default@cbo_t1 -PREHOOK: Input: default@cbo_t1@dt=2014 -#### A masked pattern was here #### -POSTHOOK: query: select f,a,e,b from (select count(*) as a, count(distinct c_int) as b, sum(distinct c_int) as c, avg(distinct c_int) as d, max(distinct c_int) as e, min(distinct c_int) as f from cbo_t1) cbo_t1 -POSTHOOK: type: QUERY -POSTHOOK: Input: default@cbo_t1 -POSTHOOK: Input: default@cbo_t1@dt=2014 -#### A masked pattern was here #### -1 20 1 1 -PREHOOK: query: select key,count(c_int) as a, avg(c_float) from cbo_t1 group by key order by a -PREHOOK: type: QUERY -PREHOOK: Input: default@cbo_t1 -PREHOOK: Input: default@cbo_t1@dt=2014 -#### A masked pattern was here #### -POSTHOOK: query: select key,count(c_int) as a, avg(c_float) from cbo_t1 group by key order by a -POSTHOOK: type: QUERY -POSTHOOK: Input: default@cbo_t1 -POSTHOOK: Input: default@cbo_t1@dt=2014 -#### A masked pattern was here #### - 1 2 1.0 - 1 2 1.0 -1 12 1.0 -1 2 1.0 -NULL 0 NULL -PREHOOK: query: select count(distinct c_int) as a, avg(c_float) from cbo_t1 group by c_float order by a -PREHOOK: type: QUERY -PREHOOK: Input: default@cbo_t1 -PREHOOK: Input: default@cbo_t1@dt=2014 -#### A masked pattern was here #### -POSTHOOK: query: select count(distinct c_int) as a, avg(c_float) from cbo_t1 group by c_float order by a -POSTHOOK: type: QUERY -POSTHOOK: Input: default@cbo_t1 -POSTHOOK: Input: default@cbo_t1@dt=2014 -#### A masked pattern was here #### -0 NULL -1 1.0 -PREHOOK: query: select count(distinct c_int) as a, avg(c_float) from cbo_t1 group by c_int order by a -PREHOOK: type: QUERY -PREHOOK: Input: default@cbo_t1 -PREHOOK: Input: default@cbo_t1@dt=2014 -#### A masked pattern was here #### -POSTHOOK: query: select count(distinct c_int) as a, avg(c_float) from cbo_t1 group by c_int order by a -POSTHOOK: type: QUERY -POSTHOOK: Input: default@cbo_t1 -POSTHOOK: Input: default@cbo_t1@dt=2014 -#### A masked pattern was here #### -0 NULL -1 1.0 -PREHOOK: query: select count(distinct c_int) as a, avg(c_float) from cbo_t1 group by c_float, c_int order by a -PREHOOK: type: QUERY -PREHOOK: Input: default@cbo_t1 -PREHOOK: Input: default@cbo_t1@dt=2014 -#### A masked pattern was here #### -POSTHOOK: query: select count(distinct c_int) as a, avg(c_float) from cbo_t1 group by c_float, c_int order by a -POSTHOOK: type: QUERY -POSTHOOK: Input: default@cbo_t1 -POSTHOOK: Input: default@cbo_t1@dt=2014 -#### A masked pattern was here #### -0 NULL -1 1.0