ModeShape adds the concept of a set query, which is a query that performs a union, intersection, or complement of the results of two other queries. Set queries are common in SQL (which is essentially a set manipulation language) and are a very useful tool that would otherwise require significant processing of the results of multiple queries by the application. By supporting set queries, the application merely needs to declare that set operation be performed, and ModeShape will perform all the work before returning the results.
ModeShape also adds the ability to use "SELECT DISTINCT", which eliminates duplicate rows in a manner similar to SQL.