In SQL Server’s algorithmic land
Are many operators elegant
But Flow Distinct is rare to understand
The hash match hides a subtle variant
Unlike the standard aggregates you know
It has no need of input ordering
Perfected by the fact it streams its rows
It stands atop the normal Hash or Stream
It hashes rows it pulls from data source
If new the hash is stored along with key
(Discarding duplicated rows of course)
Accumulating hashes gradually
To spot this operator you can try
A top distinct without an order by