Separate getDistinct to ext-overwritable function (options) and further implement sample app.