Assuming:
table1
andtable2
both have a date partition with a column name ofd
table2
referencestable1
by the columnt1_id
table1
andtable2
are stored in HDFS as RCFile
The following correctly produces NULL
(empty) values:
WITH
t1 AS (SELECT t1.id FROM table1 t1 WHERE t1.d='2014-02-24'),