| --! qt:dataset:lineitem |
| set hive.mapred.mode=nonstrict; |
| set hive.explain.user=false; |
| SET hive.vectorized.execution.enabled=true; |
| SET hive.auto.convert.join=true; |
| set hive.fetch.task.conversion=none; |
| |
| -- SORT_QUERY_RESULTS |
| |
| -- Verify HIVE-8097 with a query that has a Vectorized MapJoin in the Reducer. |
| -- Query copied from subquery_in.q |
| |
| -- non agg, non corr, with join in Parent Query |
| explain vectorization expression |
| 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') |
| ; |
| |
| 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') |
| ; |
| |
| -- non agg, corr, with join in Parent Query |
| explain vectorization expression |
| 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) |
| ; |
| |
| 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) |
| ; |