Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.2.0
-
None
Description
Introduced by HIVE-15251.
We need to extend ColumnPruner logic to take into account residual filter expressions in Join operator. Otherwise, query will fail at execution time.
Issue can be reproduced as follows:
set hive.strict.checks.cartesian.product=false; CREATE TABLE test1 (key INT, value INT, col_1 STRING); INSERT INTO test1 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'); -- Complex condition and column projection EXPLAIN SELECT col_1, col_2 FROM test1 LEFT OUTER JOIN test2 ON (test1.value=test2.value OR test1.key=test2.key); SELECT col_1, col_2 FROM test1 LEFT OUTER JOIN test2 ON (test1.value=test2.value OR test1.key=test2.key);
Attachments
Attachments
Issue Links
- is broken by
-
HIVE-15251 Provide support for complex expressions in ON clauses for OUTER joins
- Closed