Distinct Operator Implementation

See #760