Add support for returning distinct values only.