Assuming:
table1andtable2both have a date partition with a column name ofdtable2referencestable1by the columnt1_idtable1andtable2are 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'),