There are three operators that can be used to enforce distinctness: GroupSorted (Distinct), SortOp (Distinct), and HashDistinctOp. They are all unary operators. Each has advantages and disadvantages. The optimizer chooses an efficient distinct operator with respect to its use within the entire query plan’s context.
See Table 1-6 for a list and description of all query processor operators.