blob: 5bbeb17662ce65c8e16b401e8c012b4f05d41a7b [file] [log] [blame]
set hive.auto.convert.join=true;
set hive.strict.checks.cartesian.product=false;
set hive.join.emit.interval=1;
CREATE TABLE test1_n0 (key INT, value INT, col_1 STRING);
INSERT INTO test1_n0 VALUES (NULL, NULL, 'None'), (98, NULL, 'None'),
(99, 0, 'Alice'), (99, 2, 'Mat'), (100, 1, 'Bob'), (101, 2, 'Car');
CREATE TABLE test2 (key INT, value INT, col_2 STRING);
INSERT INTO test2 VALUES (102, 2, 'Del'), (103, 2, 'Ema'),
(104, 3, 'Fli'), (105, NULL, 'None');
-- Equi-condition and condition on one input (left outer join)
EXPLAIN
SELECT *
FROM test1_n0 LEFT OUTER JOIN test2
ON (test1_n0.value=test2.value AND test1_n0.key between 100 and 102);
SELECT *
FROM test1_n0 LEFT OUTER JOIN test2
ON (test1_n0.value=test2.value AND test1_n0.key between 100 and 102);
-- Condition on one input (left outer join)
EXPLAIN
SELECT *
FROM test1_n0 LEFT OUTER JOIN test2
ON (test1_n0.key between 100 and 102);
SELECT *
FROM test1_n0 LEFT OUTER JOIN test2
ON (test1_n0.key between 100 and 102);