FoundationDB/sql-layer — pull request #1204 by MMcM (2014-02-07 20:16:53+00:00)
Title: Assemble IS NULL condition for HKeyRow_Default

as a NULL literal. The different expression type is to work around confusion in the (due to be rewritten) index API between IS NULL (look for it in the index) and = NULL (no match) and absent (no restriction). But when used in this way, it's the same.

Even after #1203 has done its promotion, because that happened after constant folding (rules don't cycle like in a more formal rewrite system), the (now impossible) IS NULL condition remains.

Note that the previous idea that HKeyRow_Default might not output its row if a component was NULL was faulty. That's true of the primary key, but parent foreign keys can be nullable. See new test for a simple case.