Unique
UniqueHash
Duplicates can also be eliminated by hashing.
If the input fits in memory
- open():
- Maintain a hash table of rows in memory.
- Insert each input row into the hash table.
- If a duplicate shows up, discard it.
- next(): Output rows from the hash table.
|