linkedin/datafu — pull request #62 by matthayes (2013-08-07 01:13:28+00:00)
Title: Add EmptyBagToNullFields

Besides the test for EmptyBagToNullFields, also add a "leftJoinTest" which uses a COGROUP and FLATTEN to perform a left join with multiple variables. It turns out that EmptyBagToNull can't be used to fix the "flattening empty bag produces no results" issue. The desired behavior when flattening the null value would be would be for pig to return a tuple having null fields, but instead it just produces a null value. EmptyBagToNullFields fixes this problem, making it possible to do the left join operation.