A Set<T> containing all elements of set1 that are not contained in set2.
The subtraction operator returns a Set<T> containing all elements of set1 that are not contained in set2. The element type of the resulting set is the most specialised common type of the element type of set1 and set2 (the current implementation restricts set1 and set2 to having the same element type, hence the element type of the resulting Set<T> is identical to the element type of both source sets).
The query engine uses cross-filtering to conduct the resulting query. Both source sets must therefore have the same element type and apply the same projections (if any). The resulting query is then defined by the query
[projection]extentof(T)[filter1 && !filter2]
[Name]extentof(Person)[Age >= 19] - [Name]extentof(Person)[Age >= 49]
SELECT Name FROM Person WHERE Age>=19 AND NOT (Age >= 49)