ModeShape/modeshape — pull request #384 by rhauch (2012-05-22 23:42:02+00:00)
Title: MODE-1485 Corrected JOIN behaviors and other query-related issues

Several TCK tests were testing the JOIN behaviors, and ModeShape produced the incorrect results. This was in part because of incorrect logic within the NestedLoopJoinComponent for JOINs. In particular, the logic of which rows to include (and how) in the results was incorrect.

Additionally, the NULL handling logic was also incorrect: when evaluating the join criteria for a pair of rows, NULL values should never match other NULL values. This is the behavior of SQL and relational theory, although SQL-92 introduces the IS NOT NULL and IS NULL qualifiers for the join criteria (while JCR-SQL2 does not).

Several methods within the query results were also corrected to ensure they cannot be called when the query involves multiple selectors.

A number of TCK tests were re-enabled. Unfortunately, several query-related issues logged against the TCK tests are still open, so some query-related tests are still disabled (and are captured as part of MODE-1396).