FoundationDB/sql-layer — pull request #1373 by ScottDugas (2014-07-28 18:22:06+00:00)
Title: Handle NOT IN (... JOIN ... IN ...) bug

There are two phases to this solution:

1. Move conditions from the where conditions down into the join conditions, putting them as far down as they can go. -- this makes InConditionReverser no longer pull the condition into the ANTI join
2. Have DPhyp and later rules be graceful when conditions are in the join conditions instead of the where conditions.

This is the more general solution compared to #1359